mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-29 20:44:24 +00:00
Merge branch 'bugfix-113-error500' into 'master'
#113: bug fixed See merge request ae/Sith!294
This commit is contained in:
commit
928ae13a8a
@ -73,7 +73,7 @@ urlpatterns = [
|
|||||||
re_path(r"^register$", register, name="register"),
|
re_path(r"^register$", register, name="register"),
|
||||||
# Group handling
|
# Group handling
|
||||||
re_path(r"^group/$", GroupListView.as_view(), name="group_list"),
|
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(
|
re_path(
|
||||||
r"^group/(?P<group_id>[0-9]+)/$", GroupEditView.as_view(), name="group_edit"
|
r"^group/(?P<group_id>[0-9]+)/$", GroupEditView.as_view(), name="group_edit"
|
||||||
),
|
),
|
||||||
|
@ -37,7 +37,7 @@ from django import forms
|
|||||||
from ajax_select.fields import AutoCompleteSelectMultipleField
|
from ajax_select.fields import AutoCompleteSelectMultipleField
|
||||||
|
|
||||||
from core.models import RealGroup, User
|
from core.models import RealGroup, User
|
||||||
from core.views import CanEditMixin, DetailFormView
|
from core.views import CanCreateMixin, CanEditMixin, DetailFormView
|
||||||
|
|
||||||
# Forms
|
# Forms
|
||||||
|
|
||||||
@ -109,13 +109,13 @@ class GroupEditView(CanEditMixin, UpdateView):
|
|||||||
fields = ["name", "description"]
|
fields = ["name", "description"]
|
||||||
|
|
||||||
|
|
||||||
class GroupCreateView(CanEditMixin, CreateView):
|
class GroupCreateView(CanCreateMixin, CreateView):
|
||||||
"""
|
"""
|
||||||
Add a new Group
|
Add a new Group
|
||||||
"""
|
"""
|
||||||
|
|
||||||
model = RealGroup
|
model = RealGroup
|
||||||
template_name = "core/group_edit.jinja"
|
template_name = "core/create.jinja"
|
||||||
fields = ["name", "description"]
|
fields = ["name", "description"]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user