make the phone field have its own form. (you can have multiple django forms in the same html form) create a function that checks the country in the other form, and returns a form that is either US or International base phone checking. default it to one or the other, so that something shows up to start with.
On Jun 12, 4:05 pm, "Adi J. Sieker" <[EMAIL PROTECTED]> wrote: > Hi, > > David Cramer wrote: > > I came across the need today to modify PhoneNumberField to allow for > > International phone numbers. Doing so, it occurred to me, it'd be very > > useful just to be able to swap out my phone number field with the > > localized version based on whatever country was selected. > > > Has any thought/real-use happened in regards to doing something along > > these lines? I could see many use-cases where this could happen, but a > > lot of it in relation to internalization. > > I'm currently thinking about a similar issue with the DateField. > Currently trunk always uses the format Y-M-D when displaying dates in > input fields, which a) isn't very helpful here in germany and b) doesn't > let you submit a date if you are using alternate inout_formats and don't > supply that format. > > There is a already a DATE_FORMAT, TIME_FORMAT, DATE_TIME_FORMAT in the > po files, which are used in utils.translation. The formats are useful to > display dates for viewing but not for inout controls. The german > translation 12. Apr 2008. > In my humble and new to django opinion django should provide translated > output formats for input controls which "need" them and I'd be willing > to help on/do the implementation. > > adi > > -- > Adi J. Sieker mobile: +49 - 178 - 88 5 88 13 > Freelance developer skype: adijsieker > SAP-Consultant web: http://www.sieker.info/profile > openbc:https://www.openbc.com/hp/AdiJoerg_Sieker/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---