From 05a165095de65acd05873fbdc34ff9c05a9b9453 Mon Sep 17 00:00:00 2001 From: Levi Date: Fri, 14 Oct 2016 00:11:05 -0500 Subject: [PATCH] Fixed redirect signup error. Fixed login next url error --- digitalglarus/templates/digitalglarus/login.html | 2 +- utils/views.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/digitalglarus/templates/digitalglarus/login.html b/digitalglarus/templates/digitalglarus/login.html index e8aa40e1..f61a3f9b 100644 --- a/digitalglarus/templates/digitalglarus/login.html +++ b/digitalglarus/templates/digitalglarus/login.html @@ -49,7 +49,7 @@
- +
diff --git a/utils/views.py b/utils/views.py index 50f4aed4..e69bac1d 100644 --- a/utils/views.py +++ b/utils/views.py @@ -17,7 +17,10 @@ class SignupViewMixin(CreateView): success_url = None def get_success_url(self): - next_url = self.request.POST.get('next', self.success_url) + + next_url = self.request.POST.get('next') if self.request.POST.get('next')\ + else self.success_url + return next_url def form_valid(self, form):