From c627c42e1dd8c0b22c8dfea798aedc4fef5cd54f Mon Sep 17 00:00:00 2001 From: Jan Pieter Waagmeester Date: Thu, 31 Aug 2017 13:33:41 +0200 Subject: [PATCH] Fix two stray DEFAULT_LANGUAGEs --- example/app/views.py | 2 +- modeltrans/manager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/app/views.py b/example/app/views.py index 2a1b17a..65b33db 100644 --- a/example/app/views.py +++ b/example/app/views.py @@ -24,7 +24,7 @@ class BlogTable(tables.Table): class Meta: model = Blog fields = ( - # this field should fallback to DEFAULT_LANGUAGE + # this field should fallback to LANGUAGE_CODE 'title_i18n', 'title_en', 'title_nl', diff --git a/modeltrans/manager.py b/modeltrans/manager.py index 0cc0fbd..aed0dc6 100644 --- a/modeltrans/manager.py +++ b/modeltrans/manager.py @@ -57,7 +57,7 @@ class MultilingualQuerySet(models.query.QuerySet): - `` allow getting/setting the default language - ``_`` (for example, `_de`) allows getting/setting a specific language. - Note that if `DEFAULT_LANGUAGE == 'en'`, `_en` is mapped to ``. + Note that if `LANGUAGE_CODE == 'en'`, `_en` is mapped to ``. - `_i18n` follows the currently active translation in Django, and falls back to the default language. When adding the `modeltrans.fields.TranslationField` to a model, MultilingualManager is automatically