From 2047fb7b177b66947f5df696821111f4f25403ad Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 26 Nov 2018 16:42:58 -0400 Subject: [PATCH] Development: Don't add dev apps blindly Try to import the development apps before adding them as installed apps. Signed-off-by: Roberto Rosario --- mayan/settings/development.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/mayan/settings/development.py b/mayan/settings/development.py index 0713e6c78a..193270208d 100644 --- a/mayan/settings/development.py +++ b/mayan/settings/development.py @@ -10,14 +10,24 @@ CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGATES_EXCEPTIONS = CELERY_ALWAYS_EAGER if 'rosetta' not in INSTALLED_APPS: - INSTALLED_APPS += ( - 'rosetta', - ) + try: + import rosetta + except ImportError: + pass + else: + INSTALLED_APPS += ( + 'rosetta', + ) if 'django_extensions' not in INSTALLED_APPS: - INSTALLED_APPS += ( - 'django_extensions', - ) + try: + import django_extensions + except ImportError: + pass + else: + INSTALLED_APPS += ( + 'django_extensions', + ) ROOT_URLCONF = 'mayan.urls.development'