From 3d5645a10e0e8f04a979165d0c5e31056d7020e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Mon, 13 Aug 2018 19:06:30 +0200 Subject: [PATCH] Dumb error. --- src/rideshare/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rideshare/views.py b/src/rideshare/views.py index 2bc4f0b1..3f5ab9fe 100644 --- a/src/rideshare/views.py +++ b/src/rideshare/views.py @@ -1,6 +1,6 @@ from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin -from django.urls import reverse, reverse_lazy +from django.urls import reverse from django.views.generic import ( ListView, DetailView, @@ -84,4 +84,6 @@ class RideUpdate(LoginRequiredMixin, CampViewMixin, IsRideOwnerMixin, UpdateView class RideDelete(LoginRequiredMixin, CampViewMixin, IsRideOwnerMixin, DeleteView): model = Ride - success_url = reverse_lazy('rideshare:list') + + def get_success_url(self): + return reverse('rideshare:list', kwargs={'camp_slug': self.camp.slug})