From 231f1e54fae4bd0cdd286b65dfa745c961ce780c 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 18:59:49 +0200 Subject: [PATCH] Woops, need to use lazy. --- src/rideshare/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rideshare/views.py b/src/rideshare/views.py index 568baa8a..2bc4f0b1 100644 --- a/src/rideshare/views.py +++ b/src/rideshare/views.py @@ -1,13 +1,12 @@ from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin -from django.urls import reverse +from django.urls import reverse, reverse_lazy from django.views.generic import ( ListView, DetailView, CreateView, UpdateView, DeleteView, - FormView ) from django.http import HttpResponseRedirect from django import forms @@ -85,4 +84,4 @@ class RideUpdate(LoginRequiredMixin, CampViewMixin, IsRideOwnerMixin, UpdateView class RideDelete(LoginRequiredMixin, CampViewMixin, IsRideOwnerMixin, DeleteView): model = Ride - success_url = reverse('rideshare:list') + success_url = reverse_lazy('rideshare:list')