Source

dvd-collection / collection / templates / collection / genre_list.html

Full commit
{% extends "base.html" %}
{% load bootstrap %}
{% load cache %}

{% block jquery %}  $('#nav_genre').addClass('active');{% endblock %}

{% block title %}Browse collection by Genre{% endblock %}

{% block base_content %}
<table class="table table-condensed table-striped">
  <thead><tr><th>Genre</th><th>Titles in Genre</th><th>Highest Rated(9+ stars)</th></tr></thead>
  <tbody>
    {% cache 3600 genre_list %}
    {% for genre in genre_list %}
    <tr><td>{{genre|link}}</td><td>{{genre.movie_set.count}}</td><td>{{genre.movie_set.highest_rated|link}}</td></tr>
    {% endfor %}
    {% endcache %}
  </tbody>
</table>
{% endblock %}