Ticket #2855: boolean_default.patch

File boolean_default.patch, 513 bytes (added by Chris Beaven, 12 years ago)

simple fix

  • django/db/models/fields/__init__.py

     
    372372class BooleanField(Field):
    373373    def __init__(self, *args, **kwargs):
    374374        kwargs['blank'] = True
     375        if not kwargs.has_key('default'):
     376            kwargs['default'] = False
    375377        Field.__init__(self, *args, **kwargs)
    376378
    377379    def to_python(self, value):
Back to Top