diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-08-20 11:38:44 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-08-20 11:38:44 +0200 |
commit | 68ecbb64874a61675fb8856701b9ac4ca14c8e0a (patch) | |
tree | 150d0cb94a6fd5cea8e13e94f64c1eb024d975cd | |
parent | f58aa8293e992f8a666823f81df8d99af5cd4ef6 (diff) | |
download | Ishtar-68ecbb64874a61675fb8856701b9ac4ca14c8e0a.tar.bz2 Ishtar-68ecbb64874a61675fb8856701b9ac4ca14c8e0a.zip |
Celery: add explicit import
-rw-r--r-- | docs/fr/source/media-src/graphique_structure_ishtar.dot | 1 | ||||
-rw-r--r-- | example_project/settings.py | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/fr/source/media-src/graphique_structure_ishtar.dot b/docs/fr/source/media-src/graphique_structure_ishtar.dot index dcdca0b73..a20c936e4 100644 --- a/docs/fr/source/media-src/graphique_structure_ishtar.dot +++ b/docs/fr/source/media-src/graphique_structure_ishtar.dot @@ -20,6 +20,7 @@ digraph structure_Ishtar { OA -> Document; EA -> Document; UE -> Document; + Contenant -> Document; Mobilier -> Document; Depot -> Document; Traitement -> Document; diff --git a/example_project/settings.py b/example_project/settings.py index d7ecb4254..3af5312ce 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -292,6 +292,17 @@ except ImportError as e: except ImportError as e: print('Unable to load local_settings.py:', e) +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] + my_module = import_module(current_dir_path + ".local_settings") + module_dict = my_module.__dict__ + try: + to_import = my_module.__all__ + except AttributeError: + to_import = [name for name in module_dict if not name.startswith('_')] + globals().update({name: module_dict[name] for name in to_import}) + if LANGUAGE_CODE == "fr-fr" and SRID == 4326: SRID = 27572 # Lambert zone II - France SURFACE_SRID = 2154 # Lambert 93 - France |