1👍
✅
Every field type is different. For a CharField
(and also EmailField
since it inherits from CharField
), the first parameter is max_length
.
I don’t know why you say that was valid before Django 1.5. Looking back at the code before 1.5, that should have been invalid then too.
Maybe you are thinking of a model field? For model fields, most of the time, the first parameter is the verbose_name
, in which case, f = models.CharField('f')
would make sense.
Source:stackexchange.com