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:
@@ -0,0 +1,26 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include, url
|
||||
|
||||
from .base import * # NOQA
|
||||
|
||||
if 'rosetta' in settings.INSTALLED_APPS:
|
||||
try:
|
||||
import rosetta # NOQA
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
urlpatterns += [ # NOQA
|
||||
url(r'^rosetta/', include('rosetta.urls'), name='rosetta')
|
||||
]
|
||||
|
||||
if 'debug_toolbar' in settings.INSTALLED_APPS:
|
||||
try:
|
||||
import debug_toolbar
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
urlpatterns += [ # NOQA
|
||||
url(r'^__debug__/', include(debug_toolbar.urls))
|
||||
]
|
||||
Reference in New Issue
Block a user