fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[wolnelektury.git]
/
src
/
wolnelektury
/
settings
/
__init__.py
diff --git
a/src/wolnelektury/settings/__init__.py
b/src/wolnelektury/settings/__init__.py
index
8e0815b
..
f772d3d
100644
(file)
--- a/
src/wolnelektury/settings/__init__.py
+++ b/
src/wolnelektury/settings/__init__.py
@@
-8,7
+8,6
@@
from sentry_sdk.integrations.django import DjangoIntegration
from .apps import *
from .basic import *
from .auth import *
from .apps import *
from .basic import *
from .auth import *
-from .cache import *
from .celery import *
from .contrib import *
from .custom import *
from .celery import *
from .contrib import *
from .custom import *
@@
-23,6
+22,13
@@
except ImportError:
pass
pass
+# If Celery broker not configured, enable always-eager mode.
+try:
+ CELERY_BROKER_URL
+except NameError:
+ CELERY_TASK_ALWAYS_EAGER = True
+
+
try:
SENTRY_DSN
except NameError:
try:
SENTRY_DSN
except NameError:
@@
-32,3
+38,11
@@
else:
dsn=SENTRY_DSN,
integrations=[DjangoIntegration()]
)
dsn=SENTRY_DSN,
integrations=[DjangoIntegration()]
)
+
+
+# Dummy secret key for development.
+try:
+ SECRET_KEY
+except NameError:
+ if DEBUG:
+ SECRET_KEY = 'not-a-secret-key'