Ticket #3328: imply_blank.patch
File imply_blank.patch, 1.6 KB (added by , 18 years ago) |
---|
-
django/db/models/fields/__init__.py
66 66 creation_counter = 0 67 67 68 68 def __init__(self, verbose_name=None, name=None, primary_key=False, 69 maxlength=None, unique=False, blank= False, null=False, db_index=False,69 maxlength=None, unique=False, blank=None, null=False, db_index=False, 70 70 core=False, rel=None, default=NOT_PROVIDED, editable=True, 71 71 prepopulate_from=None, unique_for_date=None, unique_for_month=None, 72 72 unique_for_year=None, validator_list=None, choices=None, radio_admin=None, … … 75 75 self.verbose_name = verbose_name 76 76 self.primary_key = primary_key 77 77 self.maxlength, self.unique = maxlength, unique 78 if blank is None: 79 blank = null 78 80 self.blank, self.null = blank, null 79 81 self.core, self.rel, self.default = core, rel, default 80 82 self.editable = editable -
docs/model-api.txt
451 451 ``blank`` 452 452 ~~~~~~~~~ 453 453 454 If ``True``, the field is allowed to be blank. 454 If ``True``, the field is allowed to be blank. Defaults to the same value 455 as the ``null`` argument (which defaults to ``False``). 455 456 456 457 Note that this is different than ``null``. ``null`` is purely 457 458 database-related, whereas ``blank`` is validation-related. If a field has