Skip to content
Snippets Groups Projects
Commit 5551af7a authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Specify page to redirect to after submitting some seating plan forms properly

parent 020db15f
No related branches found
No related tags found
1 merge request!25Resolve "Fix redirect on form success"
Pipeline #115287 failed
......@@ -22,6 +22,11 @@ Added
* Support for usage with new AlekSIS SPA.
Fixed
~~~~~
* When no page to redirect to was passed to some of the seating plan views, an error occured.
`1.0.2`_ - 2022-11-04
---------------------
......
......@@ -55,7 +55,7 @@ class SeatingPlanCreateView(PermissionRequiredMixin, SuccessNextMixin, AdvancedC
form_class = SeatingPlanCreateForm
permission_required = "stoelindeling.create_seatingplan_rule"
template_name = "stoelindeling/seating_plan/create.html"
success_url = reverse_lazy("seating_plans")
next_page = "seating_plans"
success_message = _("The seating plan has been created.")
def get_form_kwargs(self):
......@@ -183,5 +183,5 @@ class SeatingPlanDeleteView(
model = SeatingPlan
permission_required = "stoelindeling.delete_seatingplan_rule"
template_name = "core/pages/delete.html"
success_url = reverse_lazy("seating_plans")
next_page = "seating_plans"
success_message = _("The seating plan has been deleted.")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment