Change url() to path()
This commit is contained in:
parent
4bea4d5703
commit
b95ec69d66
4 changed files with 60 additions and 53 deletions
|
|
@ -6,26 +6,28 @@ These patterns are all under the admin/* namespace.
|
|||
"""
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.conf.urls import url, include
|
||||
from django.urls import path, include
|
||||
from . import frontpage
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
# Django original admin page. Make this URL is always available, whether
|
||||
# Django original admin page. Make this URL always available, whether
|
||||
# we've chosen to use Evennia's custom admin or not.
|
||||
url(r"django/", frontpage.admin_wrapper, name="django_admin"),
|
||||
path("django/", frontpage.admin_wrapper, name="django_admin"),
|
||||
# Admin docs
|
||||
url(r"doc/", include("django.contrib.admindocs.urls")),
|
||||
path("doc/", include("django.contrib.admindocs.urls")),
|
||||
]
|
||||
|
||||
if settings.EVENNIA_ADMIN:
|
||||
|
||||
urlpatterns += [
|
||||
# Our override for the admin.
|
||||
url("^$", frontpage.evennia_admin, name="evennia_admin"),
|
||||
path("", frontpage.evennia_admin, name="evennia_admin"),
|
||||
# Makes sure that other admin pages get loaded.
|
||||
url(r"^", admin.site.urls),
|
||||
path("", admin.site.urls),
|
||||
]
|
||||
else:
|
||||
# Just include the normal Django admin.
|
||||
urlpatterns += [url(r"^/", admin.site.urls)]
|
||||
urlpatterns += [
|
||||
path("", admin.site.urls)
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue