{% extends "_base.html" %} {% block title %}Jokes{% endblock %} {% block main %}

Jokes

+ New Joke
{% with order=request.GET.order dir=request.GET.direction %} {% if order == 'joke' and dir == 'asc' %} {% else %} {% endif %} {% if order == 'category' and dir == 'asc' %} {% else %} {% endif %} {% if order == 'creator' and dir == 'asc' %} {% else %} {% endif %} {% endwith %} {% for joke in joke_list %} {% endfor %}
JokeJokeCategoryCategoryCreatorCreatorRating
{{ joke.question }} {{ joke.category.category }}
{% for tag in joke.tags.all %} {{ tag.tag }} {% endfor %}
{% if joke.user == user %} {% else %} by {{ joke.user.username }} {% endif %} {% with votes=joke.votes %}
({{ votes.num_votes }} vote{{ votes.num_votes|pluralize }}) {% endwith %}
{% include 'includes/pagination.html' %} {% endblock %}