Added template and template view for dashboard.
parent
6e7b02a2e1
commit
447edf45cb
|
|
@ -0,0 +1,5 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Dashboard</h1>
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
from django.urls import path
|
||||||
|
|
||||||
|
from .views import Dashboard
|
||||||
|
|
||||||
|
app_name = "dashboard"
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path("", Dashboard.as_view(), name="dashboard"),
|
||||||
|
]
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue