Opened 19 years ago
Closed 18 years ago
#4551 closed (wontfix)
Documentation is wrong about PhoneNumberField subclass
| Reported by: | Owned by: | Jacob | |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In the documentation on models-api it says PhoneNumberField is a CharField type but in the source code it subclasses IntegerField.
Change History (3)
comment:1 by , 19 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:2 by , 19 years ago
| Summary: | Documentation is possibly wrong about PhoneNumberField → Documentation is wrong about PhoneNumberField subclass |
|---|
comment:3 by , 18 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
This is a bit of a wierd one. PhoneNumberField extends IntegerField, but only to get the 'empty_string_allowed' setting, and avoid the to_python coercion on a CharField. At the database level, PhoneNumberField is a VARCHAR(20). So, strictly, it is a character field, although not a CharField. It definitely stores char data though, so I think in the name of end-user clarity, the existing documentation is probably the best option.
That's true.