{% extends "admin_base.html" %} {% load static %} {# {% load custom_filters %} #} {% block title %}Poll Management Dashboard | {{ site_header|default:_('Django administration') }}{% endblock %} {% block extra_css %} {{ block.super }} {% endblock extra_css %} {% block coltype %}colM{% endblock %} {% block content %}

Poll Management

Create, manage and analyze your polls with ease

Total Polls

{{ total_polls_count|default:0 }}

Total Votes Cast

{{ grand_total_votes|default:0 }}

Active Polls

{{ active_polls_count|default:total_polls_count|default:0 }}

Avg. Votes / Poll

{% if total_polls_count|default:0 > 0 %}{{ average_votes_per_poll|default:0|floatformat:1 }}{% else %}0{% endif %}

{% if not poll_data %}

No polls found.

{% if search_query %}

Try adjusting your search terms.

{% elif not perms.mimansha_main.add_poll %}

Check back later for new polls.

{% else %}

Why not create the first one?

{% endif %}
{% else %}
{% for item in poll_data %}

{{ item.poll.question }}

Total Votes: {{ item.total_votes }}|Options: {{ item.options|length }}

Options & Votes:

{% if item.options %}
{% for option in item.options %}

{{ option.option_text }}

{{ option.percentage|default:0|floatformat:1 }}%

{{ option.votes }} vote{{ option.votes|pluralize }}

{% endfor %}
{% else %}

No options defined for this poll.

{% endif %}
{% endfor %}
{% endif %}
{% endblock content %}