Opened 18 years ago
Closed 18 years ago
#4006 closed (duplicate)
Same meaning, different parameters names in newforms.*Field / db.models.*Field
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The same as a tol of developers I use Django DB model and newforms, but I found them a bit confusing and not as elegant as possible.
They uses different attribute names for defining the same thing:
Module | db.models.*Field | newforms.*Field |
Maximum length of field | maxlength | max_length |
Whether field can be empty or not | blank | required |
(maybe more)
I'm sure that if things have the same meaning, they should have the same name.
Note:
See TracTickets
for help on using tickets.
max_length vs maxlength is being resolved (e.g. #2101 and here). I agree that the blank/null distinction in the models is slightly confusing, but it's quite distinct to the newforms "required" field - which IMO is correctly named.