Dumb error.

This commit is contained in:
Víðir Valberg Guðmundsson 2018-08-13 19:06:30 +02:00
parent bd00ae3424
commit 3d5645a10e

View file

@ -1,6 +1,6 @@
from django.contrib import messages from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin 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 ( from django.views.generic import (
ListView, ListView,
DetailView, DetailView,
@ -84,4 +84,6 @@ class RideUpdate(LoginRequiredMixin, CampViewMixin, IsRideOwnerMixin, UpdateView
class RideDelete(LoginRequiredMixin, CampViewMixin, IsRideOwnerMixin, DeleteView): class RideDelete(LoginRequiredMixin, CampViewMixin, IsRideOwnerMixin, DeleteView):
model = Ride model = Ride
success_url = reverse_lazy('rideshare:list')
def get_success_url(self):
return reverse('rideshare:list', kwargs={'camp_slug': self.camp.slug})