Mercurial > public > sg101
view gpp/templates/polls/index.html @ 197:2baadae33f2e
Got autocomplete working for the member search. Updated django and ran into a bug where url tags with comma separated kwargs starting consuming tons of CPU throughput. The work-around is to cut over to using spaces between arguments. This is now allowed to be consistent with other tags. Did some query optimization for the news app.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 10 Apr 2010 04:32:24 +0000 |
parents | dbd703f7d63a |
children | ac9217eef610 |
line wrap: on
line source
{% extends 'base.html' %} {% load comment_tags %} {% block title %}Polls{% endblock %} {% block content %} <h2>Polls</h2> <h3>Current Polls</h3> {% if current_polls %} <ul> {% for poll in current_polls %} <li><a href="{{ poll.get_absolute_url }}">{{ poll.question }}</a> • {% get_comment_count for poll as comment_count %} {{ comment_count }} comment{{ comment_count|pluralize }} • {{ poll.start_date|date:"M d, Y" }} {% if poll.end_date %} - {{ poll.end_date|date:"M d, Y" }} {% endif %} </li> {% endfor %} </ul> {% else %} <p>No open polls at this time.</p> {% endif %} <h3>Closed Polls</h3> {% if old_polls %} <ul> {% for poll in old_polls %} <li><a href="{{ poll.get_absolute_url }}">{{ poll.question }}</a> • {% get_comment_count for poll as comment_count %} {{ comment_count }} comment{{ comment_count|pluralize }} • {{ poll.start_date|date:"M d, Y" }} - {{ poll.end_date|date:"M d, Y" }}</li> {% endfor %} </ul> {% else %} <p>No closed polls at this time.</p> {% endif %} {% endblock %}