Ticket #13761: orokusaki_db.models.fields.patch
File orokusaki_db.models.fields.patch, 1.5 KB (added by , 14 years ago) |
---|
-
django/db/models/fields/__init__.py
73 73 description = property(_description) 74 74 75 75 def __init__(self, verbose_name=None, name=None, primary_key=False, 76 max_length=None, unique=False, blank=False, null=False,76 max_length=None, min_length=None, unique=False, blank=False, null=False, 77 77 db_index=False, rel=None, default=NOT_PROVIDED, editable=True, 78 78 serialize=True, unique_for_date=None, unique_for_month=None, 79 79 unique_for_year=None, choices=None, help_text='', db_column=None, … … 82 82 self.name = name 83 83 self.verbose_name = verbose_name 84 84 self.primary_key = primary_key 85 self.max_length, self. _unique = max_length, unique85 self.max_length, self.min_length, self._unique = max_length, min_length, unique 86 86 self.blank, self.null = blank, null 87 87 # Oracle treats the empty string ('') as null, so coerce the null 88 88 # option whenever '' is a possible value. … … 541 541 def __init__(self, *args, **kwargs): 542 542 super(CharField, self).__init__(*args, **kwargs) 543 543 self.validators.append(validators.MaxLengthValidator(self.max_length)) 544 self.validators.append(validators.MinLengthValidator(self.min_length)) 544 545 545 546 def get_internal_type(self): 546 547 return "CharField"