##// END OF EJS Templates
Strip multiple newlines to one in the post before parsing with bbcode
Strip multiple newlines to one in the post before parsing with bbcode

File last commit:

r116:81f8bb6b default
r754:6cc0010d default
Show More
0002_auto__add_ban__chg_field_post_poster_ip.py
63 lines | 3.0 KiB | text/x-python | PythonLexer
/ boards / migrations / 0002_auto__add_ban__chg_field_post_poster_ip.py
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Ban'
db.create_table(u'boards_ban', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('ip', self.gf('django.db.models.fields.GenericIPAddressField')(max_length=39)),
))
db.send_create_signal(u'boards', ['Ban'])
# Changing field 'Post.poster_ip'
db.alter_column(u'boards_post', 'poster_ip', self.gf('django.db.models.fields.GenericIPAddressField')(max_length=39))
def backwards(self, orm):
# Deleting model 'Ban'
db.delete_table(u'boards_ban')
# Changing field 'Post.poster_ip'
db.alter_column(u'boards_post', 'poster_ip', self.gf('django.db.models.fields.IPAddressField')(max_length=15))
models = {
u'boards.admin': {
'Meta': {'object_name': 'Admin'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'boards.ban': {
'Meta': {'object_name': 'Ban'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39'})
},
u'boards.post': {
'Meta': {'object_name': 'Post'},
'_text_rendered': ('django.db.models.fields.TextField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('boards.thumbs.ImageWithThumbsField', [], {'max_length': '100', 'blank': 'True'}),
'last_edit_time': ('django.db.models.fields.DateTimeField', [], {}),
'parent': ('django.db.models.fields.BigIntegerField', [], {}),
'poster_ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39'}),
'poster_user_agent': ('django.db.models.fields.TextField', [], {}),
'pub_time': ('django.db.models.fields.DateTimeField', [], {}),
'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['boards.Tag']", 'symmetrical': 'False'}),
'text': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True'}),
'text_markup_type': ('django.db.models.fields.CharField', [], {'default': "'markdown'", 'max_length': '30'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'boards.tag': {
'Meta': {'object_name': 'Tag'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['boards']