international, including or excluding country code, using spaces or
> > dashes, with or without leading zeroes, etc.
> >
>
> This can all be done with a basic CharField in the model and some
> custom newforms widgets. Which brings the question, why do we even
> need a PhoneN
s, with or without leading zeroes, etc.
>
This can all be done with a basic CharField in the model and some
custom newforms widgets. Which brings the question, why do we even
need a PhoneNumberField at the db level? Although I suppose it helps
with the admin, form_for_model, etc.
--
Wa
i'd like to see a single generic phone number field, and different
methods attached to it that format it to the required formats. usa,
international, including or excluding country code, using spaces or
dashes, with or without leading zeroes, etc.
--~--~-~--~~~---~--~
On 6/12/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
> What happens if a phone number begins with 0 (as some international
> numbers are given in the U.S.)? Shouldn't it really be a CharField? It
> sure as heck isn't an integer.
United States phone numbers consist only of a three-digit area code,
On Wed, 2007-06-13 at 01:10 +, SmileyChris wrote:
> http://code.djangoproject.com/ticket/4551 raises the issue that the
> docs say that PhoneNumberField is a subclass of CharField when really
> it's an IntegerField.
>
> Now that's an easy fix, but looking at the c
http://code.djangoproject.com/ticket/4551 raises the issue that the
docs say that PhoneNumberField is a subclass of CharField when really
it's an IntegerField.
Now that's an easy fix, but looking at the code a bit deeper it seems
that USPhoneNumberField (the default newforms field) is