# HG changeset patch # User neko259 # Date 2016-12-29 09:33:15 # Node ID 3a810c6e0485395d4a3be0a0930a522cfdd3e6fa # Parent 867beeaedfd8b9b1ba4d64954157f12a4298da65 Removed null=True from some text fields diff --git a/boards/migrations/0055_auto_20161229_1132.py b/boards/migrations/0055_auto_20161229_1132.py new file mode 100644 --- /dev/null +++ b/boards/migrations/0055_auto_20161229_1132.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.4 on 2016-12-29 09:32 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('boards', '0054_auto_20161228_2244'), + ] + + operations = [ + migrations.AlterField( + model_name='post', + name='text', + field=models.TextField(blank=True, default=''), + ), + migrations.AlterField( + model_name='post', + name='title', + field=models.CharField(blank=True, default='', max_length=200), + ), + ] diff --git a/boards/models/post/__init__.py b/boards/models/post/__init__.py --- a/boards/models/post/__init__.py +++ b/boards/models/post/__init__.py @@ -69,9 +69,9 @@ class Post(models.Model, Viewable): app_label = APP_LABEL_BOARDS ordering = ('id',) - title = models.CharField(max_length=TITLE_MAX_LENGTH, null=True, blank=True) + title = models.CharField(max_length=TITLE_MAX_LENGTH, blank=True, default='') pub_time = models.DateTimeField(db_index=True) - text = TextField(blank=True, null=True) + text = TextField(blank=True, default='') _text_rendered = TextField(blank=True, null=True, editable=False) attachments = models.ManyToManyField(Attachment, null=True, blank=True,