Opened 9 years ago

Closed 9 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: UI/UX:


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 9 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

That's true.

comment:2 Changed 9 years ago by SmileyChris

  • Summary changed from Documentation is possibly wrong about PhoneNumberField to Documentation is wrong about PhoneNumberField subclass

comment:3 Changed 9 years ago by russellm

  • Resolution set to wontfix
  • Status changed from new to 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.

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