Update docs; fix type coercion.

This commit is contained in:
Jacek Tomaszewski 2014-06-21 23:36:01 +02:00
parent ad2985b0bf
commit 41f8c68ed4
2 changed files with 3 additions and 1 deletions

View file

@ -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::

View file

@ -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.')