Commit bbfff486 authored by David Haynes's avatar David Haynes 🙆
Browse files

Cache detail_major based on current user

parent 304c9f55
{% extends 'layouts/base.html' %}
{% block title %} SRCT Roomlist | Majors | {{ major.name }} {% endblock title %}
{% load cache %}
{% block content %}
<div class="page-header" id="banner">
......@@ -25,6 +25,7 @@
{% for building in aq_students_by_building %}
<legend><a name="{{ building.grouper }}" href="{{ building.grouper.get_absolute_url }}">{{ building.grouper }}</a></legend>
<div class="row">
{% cache 900 building.list request.user.username %}
{% for student in building.list %}
<div class="col-sm-3 text-center">
<img class="img-circle img-responsive center center-block" src="{{ student.profile_image_url }}" alt="{{ student.get_first_name_or_uname }} profile picture">
......@@ -51,6 +52,7 @@
{% for building in ra_students_by_building %}
<legend><a name="{{ building.grouper }}" href="{{ building.grouper.get_absolute_url }}">{{ building.grouper }}</a></legend>
<div class="row">
{% cache 900 building.list request.user.username %}
{% for student in building.list %}
<div class="col-sm-3 text-center">
<img class="img-circle img-responsive center center-block" src="{{ student.profile_image_url }}" alt="{{ student.get_first_name_or_uname }} profile picture">
......@@ -77,6 +79,7 @@
{% for building in sh_students_by_building %}
<legend><a name="{{ building.grouper }}" href="{{ building.grouper.get_absolute_url }}">{{ building.grouper }}</a></legend>
<div class="row">
{% cache 900 building.list request.user.username %}
{% for student in building.list %}
<div class="col-sm-3 text-center">
<img class="img-circle img-responsive center center-block" src="{{ student.profile_image_url }}" alt="{{ student.get_first_name_or_uname }} profile picture">
......@@ -99,6 +102,7 @@
<legend class="text-center">Location not visible because of student <a href="{% url 'updateStudent' request.user.username %}">privacy settings</a></legend>
<div class="row">
<div class="col-md-12">
{% cache 900 location_hidden request.user.username %}
{% for student in location_hidden %}
<div class="col-sm-3 text-center">
<img class="img-circle img-responsive center center-block" src="{{ student.profile_image_url }}" alt="{{ student.get_first_name_or_uname }} profile picture">
......@@ -113,4 +117,5 @@
<legend></legend>
{% include 'disclaimer.html' %}
{% endcache %}
{% endblock content %}
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