Added template and template view for dashboard.

pull/1/head
Calum Andrew Morrell 2025-11-09 12:53:32 +00:00
parent 6e7b02a2e1
commit 447edf45cb
3 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,5 @@
{% extends 'base.html' %}
{% block content %}
<h1>Dashboard</h1>
{% endblock %}

9
dashboard/urls.py Normal file
View File

@ -0,0 +1,9 @@
from django.urls import path
from .views import Dashboard
app_name = "dashboard"
urlpatterns = [
path("", Dashboard.as_view(), name="dashboard"),
]

View File

@ -1,3 +1,8 @@
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView
# Create your views here.
@method_decorator(login_required, name="dispatch")
class Dashboard(TemplateView):
template_name = "dashboard/dashboard.html"