diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/flatpages/models.py | 6 | ||||
| -rw-r--r-- | django/db/models/fields/__init__.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/flatpages/models.py b/django/contrib/flatpages/models.py index 896bfa3eac..42bb3adf23 100644 --- a/django/contrib/flatpages/models.py +++ b/django/contrib/flatpages/models.py @@ -11,10 +11,12 @@ class FlatPage(models.Model): url = models.CharField(_('URL'), max_length=100, db_index=True) title = models.CharField(_('title'), max_length=200) content = models.TextField(_('content'), blank=True) - enable_comments = models.BooleanField(_('enable comments')) + enable_comments = models.BooleanField(_('enable comments'), default=False) template_name = models.CharField(_('template name'), max_length=70, blank=True, help_text=_("Example: 'flatpages/contact_page.html'. If this isn't provided, the system will use 'flatpages/default.html'.")) - registration_required = models.BooleanField(_('registration required'), help_text=_("If this is checked, only logged-in users will be able to view the page.")) + registration_required = models.BooleanField(_('registration required'), + help_text=_("If this is checked, only logged-in users will be able to view the page."), + default=False) sites = models.ManyToManyField(Site) class Meta: diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 1f0ce5e4ed..142b33f6a7 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -620,8 +620,6 @@ class BooleanField(Field): def __init__(self, *args, **kwargs): kwargs['blank'] = True - if 'default' not in kwargs and not kwargs.get('null'): - kwargs['default'] = False Field.__init__(self, *args, **kwargs) def get_internal_type(self): |
