Opened 12 years ago

Closed 12 years ago

#4551 closed (wontfix)

Documentation is wrong about PhoneNumberField subclass

Reported by: adamduren@… Owned by: Jacob
Component: Documentation Version: master
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


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 Changed 12 years ago by Chris Beaven

Triage Stage: UnreviewedReady for checkin

That's true.

comment:2 Changed 12 years ago by Chris Beaven

Summary: Documentation is possibly wrong about PhoneNumberFieldDocumentation is wrong about PhoneNumberField subclass

comment:3 Changed 12 years ago by Russell Keith-Magee

Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top