Implement group management features and update templates for improved navigation

This commit is contained in:
Edgar P. Burkhart 2025-06-15 09:56:08 +02:00
parent f3e914aed8
commit 088bb52c07
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
9 changed files with 80 additions and 37 deletions

View file

@ -1,5 +1,6 @@
from django.contrib.auth.models import User
from django.contrib.messages.views import SuccessMessageMixin
from django.shortcuts import redirect
from django.urls import reverse_lazy
from django.views.generic.base import TemplateView
from django.views.generic.edit import CreateView
@ -10,6 +11,11 @@ from . import forms
class HomePageView(TemplateView):
template_name = "index.html"
def dispatch(self, request, *args, **kwargs):
if request.user.is_authenticated:
return redirect("home")
return super().dispatch(request, *args, **kwargs)
class SignupView(SuccessMessageMixin, CreateView):
model = User