Commit 53facc05 authored by Tom Kunze's avatar Tom Kunze
Browse files

config/urls: Fix inaccessible django-admin interface

Wrong order of url rules resulted in generic /<room> url from server
catching django-admin as it matches also hyphen now.

Redirect from /django-admin to /django-admin/ is needed as the generic
room url would catch the version without the trailing slash. Trailing
slash version is needed as the full url on subpages otherwise would not
include it.
parent d4b82522
......@@ -16,10 +16,12 @@ Including another URLconf
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic.base import TemplateView, RedirectView
urlpatterns = [
url(r'', include('server.urls')),
url(r'^django-admin$', RedirectView.as_view(url='/django-admin/')),
url(r'^django-admin/', admin.site.urls),
url(r'', include('server.urls')),
]
if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment