From dba3d4d65657e8ccefe35e026e7f64b96f255101 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 13 Sep 2024 12:59:22 +0100 Subject: Wraps login required for home page --- config/urls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config/urls.py') diff --git a/config/urls.py b/config/urls.py index 5a6eeeb..c5db4dd 100644 --- a/config/urls.py +++ b/config/urls.py @@ -1,5 +1,6 @@ # ruff: noqa +from django.contrib.auth.decorators import login_required from django.conf import settings from django.conf.urls.static import static from django.contrib import admin @@ -14,7 +15,7 @@ from django.views.generic import TemplateView admin.site.site_header = "Blackbird Admin Panel" urlpatterns = [ - path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), + path("", login_required(TemplateView.as_view(template_name="pages/home.html")), name="home"), path( "about/", TemplateView.as_view(template_name="pages/about.html"), -- cgit v1.2.3