Commit 603d3ef6 authored by Danny's avatar Danny

changed all occurrences of updateStudent to update_student and...

changed all occurrences of updateStudent to update_student and updateStudentMajor to update_student_major
parent 0dca9539
...@@ -39,7 +39,7 @@ class AccountAdapter(DefaultSocialAccountAdapter): ...@@ -39,7 +39,7 @@ class AccountAdapter(DefaultSocialAccountAdapter):
'slug': request.user.username, 'slug': request.user.username,
}) })
else: else:
return reverse('updateStudent', kwargs={ return reverse('update_student', kwargs={
'slug': request.user.username, 'slug': request.user.username,
}) })
...@@ -59,7 +59,7 @@ class AccountAdapter(DefaultSocialAccountAdapter): ...@@ -59,7 +59,7 @@ class AccountAdapter(DefaultSocialAccountAdapter):
raise ImmediateHttpResponse(social_redirect) raise ImmediateHttpResponse(social_redirect)
else: else:
messages.add_message(request, messages.ERROR, error_message) messages.add_message(request, messages.ERROR, error_message)
update_redirect = HttpResponseRedirect(reverse('updateStudent', kwargs={ update_redirect = HttpResponseRedirect(reverse('update_student', kwargs={
'slug': request.user.username, 'slug': request.user.username,
})) }))
raise ImmediateHttpResponse(update_redirect) raise ImmediateHttpResponse(update_redirect)
...@@ -71,7 +71,7 @@ class RemoveSocialConfirmationView(LoginRequiredMixin, ConnectionsView): ...@@ -71,7 +71,7 @@ class RemoveSocialConfirmationView(LoginRequiredMixin, ConnectionsView):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
if not request.user.socialaccount_set.all(): if not request.user.socialaccount_set.all():
# no social media accounts? back to the settings page with you! # no social media accounts? back to the settings page with you!
return HttpResponseRedirect(reverse('updateStudent', return HttpResponseRedirect(reverse('update_student',
kwargs={'slug':self.request.user.username})) kwargs={'slug':self.request.user.username}))
else: else:
return super(RemoveSocialConfirmationView, self).get(request, *args, **kwargs) return super(RemoveSocialConfirmationView, self).get(request, *args, **kwargs)
...@@ -80,5 +80,5 @@ class RemoveSocialConfirmationView(LoginRequiredMixin, ConnectionsView): ...@@ -80,5 +80,5 @@ class RemoveSocialConfirmationView(LoginRequiredMixin, ConnectionsView):
return super(RemoveSocialConfirmationView, self).form_valid(form) return super(RemoveSocialConfirmationView, self).form_valid(form)
def get_success_url(self): def get_success_url(self):
return reverse('updateStudent', return reverse('update_student',
kwargs={'slug':self.request.user.username}) kwargs={'slug':self.request.user.username})
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<br /> <br />
{% if location_hidden %} {% if location_hidden %}
<legend class="text-center">Location not visible because of student <a href="{% url 'updateStudent' request.user.username %}">privacy settings</a></legend> <legend class="text-center">Location not visible because of student <a href="{% url 'update_student' request.user.username %}">privacy settings</a></legend>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
{% for student in location_hidden %} {% for student in location_hidden %}
......
...@@ -24,13 +24,13 @@ ...@@ -24,13 +24,13 @@
<div class="row"> <div class="row">
{{ student }} text text text {{ request.user }} {{ student }} text text text {{ request.user }}
<a href="{% url 'updateStudent' request.user.student.slug %}"> <a href="{% url 'update_student' request.user.student.slug %}">
<div class="col-md-3 text-center"> <div class="col-md-3 text-center">
<h4><i class="fa fa-lock fa-5x"></i></h4> <h4><i class="fa fa-lock fa-5x"></i></h4>
<h4>Set Your Room and Privacy</h4> <h4>Set Your Room and Privacy</h4>
</div> </div>
</a> </a>
<a href="{% url 'updateStudentMajor' request.user.student.slug %}"> <a href="{% url 'update_student_major' request.user.student.slug %}">
<div class="col-md-3 text-center"> <div class="col-md-3 text-center">
<h4><i class="fa fa-graduation-cap fa-5x"></i></h4> <h4><i class="fa fa-graduation-cap fa-5x"></i></h4>
<h4>Set Your Major</h4> <h4>Set Your Major</h4>
......
...@@ -30,7 +30,7 @@ urlpatterns = patterns('', ...@@ -30,7 +30,7 @@ urlpatterns = patterns('',
# student settings # student settings
url(r'^student/(?P<slug>[\w-]+)/settings/$', url(r'^student/(?P<slug>[\w-]+)/settings/$',
UpdateStudent.as_view(), name='updateStudent'), UpdateStudent.as_view(), name='update_student'),
url(r'^student/(?P<slug>[\w-]+)/settings/social/remove/$', url(r'^student/(?P<slug>[\w-]+)/settings/social/remove/$',
RemoveSocialConfirmationView.as_view(), RemoveSocialConfirmationView.as_view(),
......
...@@ -200,7 +200,7 @@ class DetailCurrentStudentSettings(LoginRequiredMixin, DetailView): ...@@ -200,7 +200,7 @@ class DetailCurrentStudentSettings(LoginRequiredMixin, DetailView):
# update a student, but FormView to allow name update on same page # update a student, but FormView to allow name update on same page
class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView): class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView):
template_name = 'updateStudent.html' template_name = 'update_student.html'
form_class = StudentUpdateForm form_class = StudentUpdateForm
login_url = 'login' login_url = 'login'
......
...@@ -20,7 +20,7 @@ Back ...@@ -20,7 +20,7 @@ Back
{% if me.on_campus %} {% if me.on_campus %}
{% if not me.room %} {% if not me.room %}
<h3><em><a href="{% url 'updateStudent' request.user.username %}">Select your room</a>, and we'll show you the other students on your floor.</em></h3> <h3><em><a href="{% url 'update_student' request.user.username %}">Select your room</a>, and we'll show you the other students on your floor.</em></h3>
{% else %} {% else %}
{% if roomies|length == 1 %} {% if roomies|length == 1 %}
...@@ -80,7 +80,7 @@ Back ...@@ -80,7 +80,7 @@ Back
{% cache 120 landing_majors request.user.username %} {% cache 120 landing_majors request.user.username %}
{% if not me.major %} {% if not me.major %}
<h3><em><a href="{% url 'updateStudent' request.user.username %}">Set your major</a>, and we'll show you some of the other students in your program.</em></h3> <h3><em><a href="{% url 'update_student' request.user.username %}">Set your major</a>, and we'll show you some of the other students in your program.</em></h3>
{% else %} {% else %}
<h3>Other Students in <a href="{{ me.major.get_absolute_url }}">{{ me.major.name }}</a></h3> <h3>Other Students in <a href="{{ me.major.get_absolute_url }}">{{ me.major.name }}</a></h3>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<li><a href="/accounts/student/{{ user.username }}">{{ user.username }}</a> <li><a href="/accounts/student/{{ user.username }}">{{ user.username }}</a>
</li> </li>
<li> <li>
<a href="{% url 'updateStudent' request.user.username %}"><i class="fa fa-cog fa-fw fa-lg"></i></a> <a href="{% url 'update_student' request.user.username %}"><i class="fa fa-cog fa-fw fa-lg"></i></a>
</li> </li>
<li><a href="{% url 'logout' %}">Logout</a> <li><a href="{% url 'logout' %}">Logout</a>
</li> </li>
......
...@@ -29,7 +29,7 @@ class WelcomeName(LoginRequiredMixin, FormView): ...@@ -29,7 +29,7 @@ class WelcomeName(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done(): if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect) messages.add_message(request, messages.INFO, settings_redirect)
return reverse('updateStudent', return reverse('update_student',
kwargs={'slug':self.request.user.username}) kwargs={'slug':self.request.user.username})
else: else:
return super(WelcomeName, self).get(request, *args, **kwargs) return super(WelcomeName, self).get(request, *args, **kwargs)
...@@ -84,7 +84,7 @@ class WelcomePrivacy(LoginRequiredMixin, FormView): ...@@ -84,7 +84,7 @@ class WelcomePrivacy(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done(): if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect) messages.add_message(request, messages.INFO, settings_redirect)
return reverse('updateStudent', return reverse('update_student',
kwargs={'slug':self.request.user.username}) kwargs={'slug':self.request.user.username})
else: else:
return super(WelcomePrivacy, self).get(request, *args, **kwargs) return super(WelcomePrivacy, self).get(request, *args, **kwargs)
...@@ -157,7 +157,7 @@ class WelcomeMajor(LoginRequiredMixin, FormView): ...@@ -157,7 +157,7 @@ class WelcomeMajor(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done(): if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect) messages.add_message(request, messages.INFO, settings_redirect)
return reverse('updateStudent', return reverse('update_student',
kwargs={'slug':self.request.user.username}) kwargs={'slug':self.request.user.username})
else: else:
return super(WelcomeMajor, self).get(request, *args, **kwargs) return super(WelcomeMajor, self).get(request, *args, **kwargs)
...@@ -208,7 +208,7 @@ class WelcomeSocial(LoginRequiredMixin, FormView): ...@@ -208,7 +208,7 @@ class WelcomeSocial(LoginRequiredMixin, FormView):
if self.request.user.student.totally_done(): if self.request.user.student.totally_done():
messages.add_message(request, messages.INFO, settings_redirect) messages.add_message(request, messages.INFO, settings_redirect)
return reverse('updateStudent', return reverse('update_student',
kwargs={'slug':self.request.user.username}) kwargs={'slug':self.request.user.username})
else: else:
return super(WelcomeSocial, self).get(request, *args, **kwargs) 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