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

pep8 me

parent f6ed6ce5
from django.db import models
# Create your models here.
# standard library imports
from __future__ import absolute_import, print_function
# core django imports
from django.conf.urls import patterns, include, url
from django.conf.urls import patterns, url
from django.views.generic import RedirectView
from django.core.urlresolvers import reverse_lazy
# imports from your apps
......
......@@ -34,7 +34,7 @@ class WelcomeName(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect)
return redirect(reverse('update_student',
kwargs={'slug':self.request.user.username}))
kwargs={'slug': self.request.user.username}))
else:
return super(WelcomeName, self).get(request, *args, **kwargs)
......@@ -91,7 +91,7 @@ class WelcomePrivacy(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect)
return redirect(reverse('update_student',
kwargs={'slug':self.request.user.username}))
kwargs={'slug': self.request.user.username}))
else:
return super(WelcomePrivacy, self).get(request, *args, **kwargs)
......@@ -166,7 +166,7 @@ class WelcomeMajor(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect)
return redirect(reverse('update_student',
kwargs={'slug':self.request.user.username}))
kwargs={'slug': self.request.user.username}))
else:
return super(WelcomeMajor, self).get(request, *args, **kwargs)
......@@ -175,7 +175,6 @@ class WelcomeMajor(LoginRequiredMixin, FormView):
me = Student.objects.get(user=self.request.user)
form = WelcomeMajorForm(initial={'major': me.major,
'graduating_year': me.graduating_year, })
......@@ -219,7 +218,7 @@ class WelcomeSocial(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect)
return redirect(reverse('update_student',
kwargs={'slug':self.request.user.username}))
kwargs={'slug': self.request.user.username}))
else:
return super(WelcomeSocial, self).get(request, *args, **kwargs)
......@@ -253,4 +252,4 @@ class WelcomeSocial(LoginRequiredMixin, FormView):
"You successfully finished the welcome walkthrough!")
return reverse('detail_student',
kwargs={'slug':self.request.user.username})
kwargs={'slug': self.request.user.username})
[flake8]
max-line-length = 89
exclude = */migrations/*, .git
exclude = */migrations/*, .git, secret.py
max-complexity = 10
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