Require login by default
This commit is contained in:
@ -67,6 +67,9 @@ if DEBUG:
|
||||
DEBUG_TOOLBAR_CONFIG = {"ROOT_TAG_EXTRA_ATTRS": "hx-preserve"}
|
||||
|
||||
ROOT_URLCONF = "timetracker.urls"
|
||||
LOGIN_URL = "/login/"
|
||||
LOGIN_REDIRECT_URL = "/"
|
||||
LOGOUT_REDIRECT_URL = "/login/"
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
|
@ -15,6 +15,7 @@ Including another URLconf
|
||||
"""
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth import views as auth_views
|
||||
from django.urls import include, path
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.views.generic import RedirectView
|
||||
@ -22,6 +23,8 @@ from graphene_django.views import GraphQLView
|
||||
|
||||
urlpatterns = [
|
||||
path("", RedirectView.as_view(url="/tracker")),
|
||||
path("login/", auth_views.LoginView.as_view(), name="login"),
|
||||
path("logout/", auth_views.LogoutView.as_view(), name="logout"),
|
||||
path("tracker/", include("games.urls")),
|
||||
path("graphql", csrf_exempt(GraphQLView.as_view(graphiql=True))),
|
||||
]
|
||||
|
Reference in New Issue
Block a user