Standardize localfavour items

0 views
Skip to first unread message

ElGranAzul

unread,
Apr 2, 2007, 5:50:04 AM4/2/07
to Django developers
Hi all.

I'm working in the Spanish localflavour (to be released today or
tomorrow), and I want to propose a standard way to define locale
validations. It could help to developers to create the content and,
for example, using introspection select the correct locale. It only
could be done if there a standard name convention for validations.

It could be something like:

localflavor
es
__init__.py
subdivision.py
forms.py
class PostalCode
class SubdivisionSelect
class PhoneNumber
class SocialSecurityNumber
class IdentityDocument
class PlateFormat
...

And so on... if you like it, we can create a set of localized items to
create (if exist in that locale).

Malcolm Tredinnick

unread,
Apr 2, 2007, 6:14:28 AM4/2/07
to django-d...@googlegroups.com

I'm -1 on this, I think.

Creating forms that automatically replace certain fields based on the
locale seems risky. Your form handling code is already going to need to
have some smarts to handle different locales (for example, when is
Postcode required? When is SSN not available?) So that sort of thing
should be code explicitly, I feel.

Regards,
Malcolm

ElGranAzul

unread,
Apr 2, 2007, 7:01:02 AM4/2/07
to Django developers
Localflavour need not to handle the field replacing. I'm proposing
only to create the base that allow it.

Reply all
Reply to author
Forward
0 new messages