phase2: add modular apps, auth scaffolding, and base template routing
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
from django.urls import path
|
||||
|
||||
from .views import health, home
|
||||
from .views import DashboardView, HomeView, health
|
||||
|
||||
app_name = "core"
|
||||
|
||||
urlpatterns = [
|
||||
path("", home, name="home"),
|
||||
path("", HomeView.as_view(), name="home"),
|
||||
path("dashboard/", DashboardView.as_view(), name="dashboard"),
|
||||
path("health/", health, name="health"),
|
||||
]
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.views.generic import TemplateView
|
||||
from django.http import JsonResponse
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def home(request):
|
||||
return render(request, "home.html")
|
||||
class HomeView(TemplateView):
|
||||
template_name = "core/home.html"
|
||||
|
||||
|
||||
class DashboardView(LoginRequiredMixin, TemplateView):
|
||||
template_name = "core/dashboard.html"
|
||||
|
||||
|
||||
def health(request):
|
||||
|
||||
Reference in New Issue
Block a user