New model fields for languages and countries at least
|Reported by:||Owned by:||Marinho Brandão|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||chris@…, semente@…, gregor@…, hr.bjarni+django@…, hector+django@…, mmitar@…, flavio.curella@…, jeffrey@…, windbottle, gezuru@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
I think that many applications have to deal either with language specific content and/or countries. It would be nice if Django provided ready to use fields for languages and countries instead of asking every user to handle the list and its full translation by himself (it could be a contrib package though). IMO this is best done by creating some glue on one of the available open-source reference lists. At Debian, we use a package called iso-codes that is very well-translated and kept up-to-date as it's used by our installer.
I can also mention the django-countries project created by Chris Moffitt (who created Satchmo, a Django-powered e-commerce framework). Its extent is somewhat more limited but it's already developed specifically for Django.
And then, of course, there's Babel:
The idea is to have something like:
country = models.CountryField() language = models.LanguageField()
COUNTRIES = ( ('fr', _('France')), ('de', _('Germany')), ... ) country = models.CharField(max_length=10, choices=COUNTRIES)
which requires redoing the translation work and which is tedious to manually maintain.
Change History (43)
comment:4 Changed 10 years ago by
|Component:||Database wrapper → Contrib apps|
|Triage Stage:||Unreviewed → Accepted|
comment:9 Changed 9 years ago by
|Owner:||changed from nobody to Marinho Brandão|
|Status:||new → assigned|
comment:10 Changed 9 years ago by
|Component:||Contrib apps → Database wrapper|
|Status:||assigned → closed|