diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-11-15 20:49:27 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-11-15 20:51:05 +0100 |
commit | 9f7f656da88d8770ac79ad69b9cfaf0b26733b76 (patch) | |
tree | 7b615b92d6e3161473184f7f55450148e6e5df99 /example_project | |
parent | 18469769e8fd2bf008c88faae4fc7592d265c446 (diff) | |
download | Ishtar-9f7f656da88d8770ac79ad69b9cfaf0b26733b76.tar.bz2 Ishtar-9f7f656da88d8770ac79ad69b9cfaf0b26733b76.zip |
Overload translation in database
Diffstat (limited to 'example_project')
-rw-r--r-- | example_project/local_settings.py.sample | 3 | ||||
-rw-r--r-- | example_project/settings.py | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/example_project/local_settings.py.sample b/example_project/local_settings.py.sample index f49963c84..555adb711 100644 --- a/example_project/local_settings.py.sample +++ b/example_project/local_settings.py.sample @@ -51,3 +51,6 @@ SRID = 27572 ENCODING = '' # specific encoding for CSV export - default to utf-8 SURFACE_UNIT = 'square-metre' SURFACE_UNIT_LABEL = u'm²' + +# translation overload can consume resources for a low profile machine +# USE_TRANSLATION_OVERLOAD = True diff --git a/example_project/settings.py b/example_project/settings.py index 65ca93395..b858c5907 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -170,6 +170,9 @@ INSTALLED_APPS = [ # 'debug_toolbar', ] +USE_TRANSLATION_OVERLOAD = True +TRANSLATION_OVERLOAD_DEBUG = False + MAIN_APP = "" LOGFILE = '' @@ -294,6 +297,9 @@ except ImportError as e: except ImportError as e: print('Unable to load local_settings.py:', e) +if USE_TRANSLATION_OVERLOAD: + INSTALLED_APPS.insert(0, 'overload_translation') + if "SECRET_KEY" not in globals(): # explicit import from the root for celery current_path = os.path.abspath(__file__) current_dir_path = os.path.dirname(current_path).split(os.sep)[-1] |