From c30af400795ed895ace6a2dd8916562a30fe1718 Mon Sep 17 00:00:00 2001 From: reverend Date: Thu, 10 Sep 2020 18:38:26 +0200 Subject: [PATCH] Cleaned stuff up --- lostplaces/lostplaces_app/views/base_views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lostplaces/lostplaces_app/views/base_views.py b/lostplaces/lostplaces_app/views/base_views.py index f0ec88d..8012f6f 100644 --- a/lostplaces/lostplaces_app/views/base_views.py +++ b/lostplaces/lostplaces_app/views/base_views.py @@ -17,7 +17,7 @@ class IsAuthenticated(LoginRequiredMixin, View): If the user is not logged in, he gets redirected to the login page. ''' - redirect_field_name = 'redirect_to' + login_url = reverse_lazy('login') permission_denied_message = 'Please login to proceed' def handle_no_permission(self): @@ -83,7 +83,6 @@ class PlaceAssetCreateView(IsAuthenticated, SuccessMessageMixin, CreateView): class PlaceAssetDeleteView(IsAuthenticated, IsPlaceSubmitter, SingleObjectMixin, View): model = None - pk_url_kwarg = 'pk' success_message = '' permission_denied_message = ''