Remove development URLs from main URL file

Move the development URL definitions for Rosetta and Debug toolbar
to a separate URL file. Convert the single urls.py to a module to
allow multiple URL files to be used.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-12 01:53:06 -04:00
parent fab94319bb
commit 1fa91f0ef7
6 changed files with 61 additions and 24 deletions

View File

@@ -10,14 +10,26 @@ 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'
TEMPLATES[0]['OPTIONS']['loaders'] = (
'django.template.loaders.filesystem.Loader',