urls: Move the dual-use patterns config up.

This commit is contained in:
Tim Abbott 2016-06-24 15:33:50 -07:00
parent 169810b874
commit 92f5e38171
1 changed files with 6 additions and 7 deletions

View File

@ -214,6 +214,12 @@ v1_api_and_json_patterns = patterns('zerver.views',
'DELETE': 'cleanup_event_queue'}),
)
# Include the dual-use patterns twice
urlpatterns += [
url(r'^api/v1/', include(v1_api_and_json_patterns)),
url(r'^json/', include(v1_api_and_json_patterns)),
]
# Include URL configuration files for site-specified extra installed
# Django apps
for app_name in settings.EXTRA_INSTALLED_APPS:
@ -230,13 +236,6 @@ urlpatterns += [
url(r'^notify_tornado$', 'zerver.tornadoviews.notify'),
]
# Include the dual-use patterns twice
urlpatterns += [
url(r'^api/v1/', include(v1_api_and_json_patterns)),
url(r'^json/', include(v1_api_and_json_patterns)),
]
if settings.DEVELOPMENT:
use_prod_static = getattr(settings, 'PIPELINE', False)
static_root = os.path.join(settings.DEPLOY_ROOT,