From b630742fd404a9178a8fceae8b44c643a9a535ca Mon Sep 17 00:00:00 2001 From: Cyrille Date: Tue, 30 Nov 2021 17:54:51 +0100 Subject: [PATCH] #113: bug fixed --- core/urls.py | 2 +- core/views/group.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/urls.py b/core/urls.py index 6a853707..c0441da5 100644 --- a/core/urls.py +++ b/core/urls.py @@ -73,7 +73,7 @@ urlpatterns = [ re_path(r"^register$", register, name="register"), # Group handling re_path(r"^group/$", GroupListView.as_view(), name="group_list"), - re_path(r"^group/new$", GroupCreateView.as_view(), name="group_new"), + re_path(r"^group/new/$", GroupCreateView.as_view(), name="group_new"), re_path( r"^group/(?P[0-9]+)/$", GroupEditView.as_view(), name="group_edit" ), diff --git a/core/views/group.py b/core/views/group.py index 45472388..fa394174 100644 --- a/core/views/group.py +++ b/core/views/group.py @@ -37,7 +37,7 @@ from django import forms from ajax_select.fields import AutoCompleteSelectMultipleField from core.models import RealGroup, User -from core.views import CanEditMixin, DetailFormView +from core.views import CanCreateMixin, CanEditMixin, DetailFormView # Forms @@ -109,13 +109,13 @@ class GroupEditView(CanEditMixin, UpdateView): fields = ["name", "description"] -class GroupCreateView(CanEditMixin, CreateView): +class GroupCreateView(CanCreateMixin, CreateView): """ Add a new Group """ model = RealGroup - template_name = "core/group_edit.jinja" + template_name = "core/create.jinja" fields = ["name", "description"]