mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-03-16 22:10:31 +00:00
Update docs; fix type coercion.
This commit is contained in:
parent
ad2985b0bf
commit
41f8c68ed4
2 changed files with 3 additions and 1 deletions
|
|
@ -192,6 +192,8 @@ can use the ``update_translation_fields`` command below. See
|
|||
Required fields
|
||||
---------------
|
||||
|
||||
.. versionadded:: 0.8
|
||||
|
||||
By default, all translation fields are optional (not required). It can be changed using special
|
||||
attribute on ``TranslationOptions``, though::
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class TranslationOptions(with_metaclass(FieldsAggregationMetaClass, object)):
|
|||
'Fieldname in required_languages which is not in fields option.')
|
||||
|
||||
def _check_languages(self, languages, extra=()):
|
||||
correct = mt_settings.AVAILABLE_LANGUAGES + list(extra)
|
||||
correct = list(mt_settings.AVAILABLE_LANGUAGES) + list(extra)
|
||||
if any(l not in correct for l in languages):
|
||||
raise ImproperlyConfigured(
|
||||
'Language in required_languages which is not in AVAILABLE_LANGUAGES.')
|
||||
|
|
|
|||
Loading…
Reference in a new issue