Commit efbbeb10 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

fixed problem with redirect to settings on url resolution following welcome walkthrough completion

parent cf380fa2
......@@ -2,7 +2,7 @@
from __future__ import absolute_import, print_function
from distutils.util import strtobool
# core django imports
from django.shortcuts import render
from django.shortcuts import redirect
from django.views.generic import FormView
from django.core.urlresolvers import reverse
from django.contrib import messages
......@@ -29,8 +29,8 @@ class WelcomeName(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect)
return reverse('update_student',
kwargs={'slug':self.request.user.username})
return redirect(reverse('update_student',
kwargs={'slug':self.request.user.username}))
else:
return super(WelcomeName, self).get(request, *args, **kwargs)
......@@ -84,8 +84,8 @@ class WelcomePrivacy(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect)
return reverse('update_student',
kwargs={'slug':self.request.user.username})
return redirect(reverse('update_student',
kwargs={'slug':self.request.user.username}))
else:
return super(WelcomePrivacy, self).get(request, *args, **kwargs)
......@@ -157,8 +157,8 @@ class WelcomeMajor(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect)
return reverse('update_student',
kwargs={'slug':self.request.user.username})
return redirect(reverse('update_student',
kwargs={'slug':self.request.user.username}))
else:
return super(WelcomeMajor, self).get(request, *args, **kwargs)
......@@ -208,8 +208,8 @@ class WelcomeSocial(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect)
return reverse('update_student',
kwargs={'slug':self.request.user.username})
return render_to_string('update_student',
context={'slug':self.request.user.username})
else:
return super(WelcomeSocial, self).get(request, *args, **kwargs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment