Ticket #1665: fields.py.diff
File fields.py.diff, 1.3 KB (added by , 19 years ago) |
---|
-
fields.py
107 107 core=False, rel=None, default=NOT_PROVIDED, editable=True, 108 108 prepopulate_from=None, unique_for_date=None, unique_for_month=None, 109 109 unique_for_year=None, validator_list=None, choices=None, radio_admin=None, 110 help_text='', db_column=None ):110 help_text='', db_column=None, length=None): 111 111 self.name = name 112 112 self.verbose_name = verbose_name or (name and name.replace('_', ' ')) 113 113 self.primary_key = primary_key 114 114 self.maxlength, self.unique = maxlength, unique 115 self.length = length 115 116 self.blank, self.null = blank, null 116 117 self.core, self.rel, self.default = core, rel, default 117 118 self.editable = editable … … 222 223 params = {'validator_list': self.validator_list[:]} 223 224 if self.maxlength and not self.choices: # Don't give SelectFields a maxlength parameter. 224 225 params['maxlength'] = self.maxlength 226 if self.length: 227 params['length'] = self.length 225 228 if isinstance(self.rel, ManyToOneRel): 226 229 params['member_name'] = name_prefix + self.attname 227 230 if self.rel.raw_id_admin: