robcharlwood / django-mothertongue

A light-weight django model translation application designed to simplify the process of creating multi-lingual websites and serving appropriate content.
http://pypi.python.org/pypi/django-mothertongue/0.0.6
MIT License
33 stars 4 forks source link

max_len in language field at docs #4

Open chemt opened 13 years ago

chemt commented 13 years ago

In docs there is example of using django-mothertongue

# chunks translations model
class GenericPageTranslation(models.Model):
    generic_page_instance = models.ForeignKey('GenericPage', verbose_name=_('generic_page'))
    language = models.CharField(max_length=len(settings.LANGUAGES)-1, choices=settings.LANGUAGES[1:])

Field language should have max_length = 10 (оr greather), but not len(settings.LANGUAGES)-1

zhangcheng commented 13 years ago

Agree with @chemt

fdemmer commented 11 years ago

imho it should be 2. thats a sample settings.LANGUAGES:

LANGUAGES = (
    ('de', _('Deutsch')),
    ('en', _('English')),
)