Add login and home page

This commit is contained in:
2025-12-10 18:28:07 +05:30
parent df595e4f19
commit 27aac4da8c
13 changed files with 239 additions and 3 deletions

View File

@@ -1,3 +1,12 @@
from django.shortcuts import render
from typing import Any
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import TemplateView
# Create your views here.
class HomePage(LoginRequiredMixin, TemplateView):
template_name = "notes/home.html"
def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
ctx = super().get_context_data(**kwargs)
ctx['notes'] = self.request.user.alive_received_notes
return ctx