use simplified URL routing syntax

was introduced in django 2.0
This commit is contained in:
Tobias Bengfort
2021-06-17 10:43:19 +02:00
parent f654debb98
commit daece24c6d
2 changed files with 39 additions and 42 deletions

View File

@@ -14,15 +14,15 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import include, path, re_path
from django.urls import include, path
from . import auth, views
urlpatterns = [
path("admin/", admin.site.urls),
path("mfa/", include("mfa.urls")),
path("auth/login", auth.loginView, name="login"),
path("auth/logout", auth.logoutView, name="logout"),
re_path("^$", views.home, name="home"),
path("auth/login/", auth.loginView, name="login"),
path("auth/logout/", auth.logoutView, name="logout"),
path("", views.home, name="home"),
path("registered/", views.registered, name="registered"),
]