diff --git a/ixc_django_docker/settings/base.py b/ixc_django_docker/settings/base.py index 13afc04..2b8c9f4 100644 --- a/ixc_django_docker/settings/base.py +++ b/ixc_django_docker/settings/base.py @@ -139,6 +139,9 @@ MEDIA_ROOT = os.path.join(VAR_DIR, 'media_root') MEDIA_URL = '/media/' +# Prefix for admin URL paths, see `ixc_django_docker.urls` +ADMIN_URL = '/admin/' + # # HTTPS # diff --git a/ixc_django_docker/urls.py b/ixc_django_docker/urls.py index 9fc7493..88e8fd2 100644 --- a/ixc_django_docker/urls.py +++ b/ixc_django_docker/urls.py @@ -17,9 +17,10 @@ # Django Admin. if 'django.contrib.admin' in settings.INSTALLED_APPS: + _prefix = settings.ADMIN_URL.strip("/") urlpatterns += [ - url(r'^admin/doc/', include('django.contrib.admindocs.urls')), - url(r'^admin/', include(admin.site.urls)), + url(r'^%s/doc/' % _prefix, include('django.contrib.admindocs.urls')), + url(r'^%s/' % _prefix, include(admin.site.urls)), ] # Django Auth.