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

Cache students shown on floor

parent bbfff486
{% extends 'layouts/base.html' %} {% extends 'layouts/base.html' %}
{% load humanize %} {% load humanize %}
{% load cache %}
{% block title %} SRCT Roomlist • {{ floor.building.name }} {{ floor.number|ordinal }}{% endblock %} {% block title %} SRCT Roomlist • {{ floor.building.name }} {{ floor.number|ordinal }}{% endblock %}
{% block content %} {% block content %}
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
{% load gravatar %} {% load gravatar %}
<div class="row"> <div class="row">
{% cache 900 students request.user.username %}
{% for student in students %} {% for student in students %}
<div class="col-sm-3 text-center"> <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"> <img class="img-circle img-responsive center center-block" src="{{ student.profile_image_url }}" alt="{{ student.get_first_name_or_uname }} profile picture">
...@@ -61,4 +63,5 @@ ...@@ -61,4 +63,5 @@
<legend></legend> <legend></legend>
{% include 'disclaimer.html' %} {% include 'disclaimer.html' %}
{% endcache %}
{% endblock %} {% endblock %}
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