diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-03-15 18:57:45 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-17 13:21:27 +0200 |
commit | de20f704453581bb34ec0152825111e85808ccc2 (patch) | |
tree | eb79f424c92c37189346e956f9fe5b8f89ba4f22 /example_project | |
parent | e76cfa15af8a156b9851236eebb74c22858db481 (diff) | |
download | Ishtar-de20f704453581bb34ec0152825111e85808ccc2.tar.bz2 Ishtar-de20f704453581bb34ec0152825111e85808ccc2.zip |
Celery: manage cached_label update with tasks
Diffstat (limited to 'example_project')
-rw-r--r-- | example_project/__init__.py.celery.sample | 2 | ||||
-rw-r--r-- | example_project/celery_app.py.sample (renamed from example_project/celery.py.sample) | 0 | ||||
-rw-r--r-- | example_project/settings.py | 7 |
3 files changed, 6 insertions, 3 deletions
diff --git a/example_project/__init__.py.celery.sample b/example_project/__init__.py.celery.sample index ebae6a3c3..5dad2ced8 100644 --- a/example_project/__init__.py.celery.sample +++ b/example_project/__init__.py.celery.sample @@ -1,7 +1,7 @@ # force the retranslation of generated strings and external module from django.utils.translation import ugettext_lazy as _ -from .celery import app as celery_app +from .celery_app import app as celery_app __all__ = ('celery_app',) diff --git a/example_project/celery.py.sample b/example_project/celery_app.py.sample index 3aed98038..3aed98038 100644 --- a/example_project/celery.py.sample +++ b/example_project/celery_app.py.sample diff --git a/example_project/settings.py b/example_project/settings.py index 09590f807..bf2b26c31 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -273,9 +273,12 @@ DOT_BINARY = "" TEST_RUNNER = 'ishtar_common.tests.ManagedModelTestRunner' try: - from .local_settings import * + from local_settings import * except ImportError as e: - print('Unable to load local_settings.py:', e) + try: + from .local_settings import * + except ImportError as e: + print('Unable to load local_settings.py:', e) if LANGUAGE_CODE == "fr-fr" and SRID == 4326: SRID = 27572 # Lambert zone II - France |