Commit 8bf7a6b6 authored by Daniel W Bond's avatar Daniel W Bond

removed login requirement for major and housing list pages, since there's no...

removed login requirement for major and housing list pages, since there's no sensitive information there; added a 'pls sign up' message at the top
parent 5a083ac6
{% extends 'layouts/base.html' %}
{% block title %} SRCT Roomlist | Majors | {{ major.name }} {% endblock title %}
{% block title %} SRCT Roomlist | Majors {% endblock title %}
{% block content %}
{% include 'no_auth.html' %}
{% load cache %}
{% cache 900 list_majors %}
......
......@@ -316,14 +316,12 @@ class UpdateStudent(LoginRequiredMixin, FormValidMessageMixin, FormView):
# majors pages
class ListMajors(LoginRequiredMixin, ListView):
class ListMajors(ListView):
model = Major
queryset = Major.objects.all().order_by('name')
context_object_name = 'majors'
template_name = 'list_majors.html'
login_url = 'login'
class DetailMajor(LoginRequiredMixin, DetailView):
model = Major
......
......@@ -3,6 +3,9 @@
{% block title %} SRCT Roomlist • Neighborhoods {% endblock title %}
{% block content %}
{% include 'no_auth.html' %}
{% load cache %}
{% cache 900 list_buildings %}
......
......@@ -10,15 +10,13 @@ from accounts.models import Student
# a list of neighborhoods and their buildings
class ListBuildings(LoginRequiredMixin, ListView):
class ListBuildings(ListView):
model = Building
queryset = Building.objects.all()
# paginate_by
context_object_name = 'buildings'
template_name = 'list_buildings.html'
login_url = 'login'
def get_context_data(self, **kwargs):
context = super(ListBuildings, self).get_context_data(**kwargs)
context['rappahannock'] = Building.objects.filter(neighbourhood='ra').order_by('name')
......
{% if not user.is_authenticated %}
<div class="row">
<div class="col-md-12 text-center">
<a href="{% url 'login' %}" class="btn btn-info btn-block">Not on Roomlist yet? Log in with your Mason username and password!</a>
</div>
</div>
{% endif %}
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