-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Interface for using country submodules generically #59
Comments
Interesting, I think that would be useful for cases in which a site has a target audience of a couple of countries, such as US/Canada or Germany/Austria/Switzerland etc. Did you end up using something like the gist in your client project? |
I'm curious, would it be possible to pick some inspiration from https://github.com/mthornhill/django-postal too? For international sites, providing reasonable address inputs + validation is quite hard. Currently I just follow the fields of the payment gateway, but there is hardly any validation. |
Problematic are provinces vs states, double localizing (de.DEZipCode us.USZipCode, DEStateSelect,...). |
The use case is having a country selector and then based upon the country that is selected displaying a
select
input field for the regions for that country. I am doing this for a client currently so this gist is hardcoded a bit for their needs (not options expansion for the field, etc.) but wouldn't take much to make this more generally usable.I recognize that it would be hard to make this pattern cover ALL uses the different locale specific constants/objects, but if this approach I am taking would be generally useful for inclusion in this package, i would be happy to work on something for a proper PR.
https://gist.github.com/paltman/7551838
Any feedback/thoughts?
The text was updated successfully, but these errors were encountered: