Skip to content

Commit

Permalink
Merge pull request #1934 from winged/fix_crash_without_dev_deps
Browse files Browse the repository at this point in the history
fix: do not crash when django-extensions is missing
  • Loading branch information
winged authored Dec 9, 2022
2 parents 5df34cd + 6028be3 commit 75ea968
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion caluma/settings/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
]

if DEBUG:
INSTALLED_APPS.append("django_extensions")
try:
__import__("django_extensions")
INSTALLED_APPS.append("django_extensions")
except ImportError: # pragma: no cover
# Nothing bad, just won't have django-extensions
# niceties installed (Most likely Caluma was built)
# without dev dependencies
pass

MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
Expand Down

0 comments on commit 75ea968

Please sign in to comment.