default
34.15 ms (22 queries
including 19 similar
and 2 duplicates
)
Query
Timeline
Time (ms)
Action
SELECT COUNT(*) AS "__count" FROM "polls_poll" WHERE ("polls_poll"."is_active" AND "polls_poll"."start_date" <= '2026-01-31T08:09:21.794624+00:00'::timestamptz)SELECT ••• FROM "polls_poll" WHERE ("polls_poll"."is_active" AND "polls_poll"."start_date" <= '2026-01-31T08:09:21.794624+00:00'::timestamptz)
0.24
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(30)
polls = paginator.get_page(request.GET.get('page', 1))/home/nathan/rb/site/./digg_paginator/utils.py in get_page(274)
return self.page(page)/home/nathan/rb/site/./digg_paginator/utils.py in page(199)
page = super(DiggPaginator, self).page(number, *args, **kwargs)/home/nathan/rb/site/./digg_paginator/utils.py in page(47)
return super(ExPaginator, self).page(number)
SELECT "countries_plus_country"."iso", "countries_plus_country"."iso3", "countries_plus_country"."iso_numeric", "countries_plus_country"."fips", "countries_plus_country"."name", "countries_plus_country"."capital", "countries_plus_country"."area", "countries_plus_country"."population", "countries_plus_country"."continent", "countries_plus_country"."tld", "countries_plus_country"."currency_code", "countries_plus_country"."currency_symbol", "countries_plus_country"."currency_name", "countries_plus_country"."phone", "countries_plus_country"."postal_code_format", "countries_plus_country"."postal_code_regex", "countries_plus_country"."languages", "countries_plus_country"."geonameid", "countries_plus_country"."neighbours", "countries_plus_country"."equivalent_fips_code" FROM "countries_plus_country" WHERE "countries_plus_country"."iso" = 'US' LIMIT 21SELECT ••• FROM "countries_plus_country" WHERE "countries_plus_country"."iso" = 'US' LIMIT 21
0.19
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./rb/templatetags/rb_geo.py in geo_currency(20)
geo_data = user.geo.get_user_currency()/home/nathan/rb/site/./geo/geo.py in get_user_currency(252)
country = Country.objects.get(iso=country_code)
412
</a>
413
</li>
414
<li class="hidden-xs">
415
{% geo_currency request.user %}
416
</li>
417
{% comment %}
418
<li class="hidden-xs hidden-sm">
419
<a href={% if request.user.is_authenticated %}"{% url 'user_profile_settings' request.user.get_username %}#personalisation"{% else %}"#" onclick="return false;"{% endif %} title="All date/times are being converted to this timezone">{% get_user_timezone request.user %}</a>
SELECT "polls_poll"."id", "polls_poll"."start_date", "polls_poll"."end_date", "polls_poll"."description", "polls_poll"."poll_type", "polls_poll"."is_active" FROM "polls_poll" WHERE ("polls_poll"."is_active" AND "polls_poll"."start_date" <= '2026-01-31T08:09:21.794624+00:00'::timestamptz) ORDER BY "polls_poll"."start_date" DESC LIMIT 6 OFFSET 60SELECT ••• FROM "polls_poll" WHERE ("polls_poll"."is_active" AND "polls_poll"."start_date" <= '2026-01-31T08:09:21.794624+00:00'::timestamptz) ORDER BY "polls_poll"."start_date" DESCLIMIT 6 OFFSET 60
0.17
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})
SELECT "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color", COUNT("polls_pollvote"."id") AS "num" FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 7) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASCSELECT ••• FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 7) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASC
5 similar queries.
9.96
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_results(77)
total = sum(v['num'] for v in votes)
1
{% if poll.user_vote or request.user.is_anonymous or poll.is_past %}
2
{% for vote in poll.get_results %}
3
<div class="row">
4
<div class="col-sm-3 col-md-2">
5
{% if poll.user_vote.option_id == vote.option__id %}(voted){% endif %}
SELECT COUNT(*) AS "__count" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '7' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '7' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")
6 similar queries.
2.69
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
context[self.as_varname] = self.get_context_value_from_queryset(context, qs)/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
return qs.count()
42
{% else %}
43
<span class="hidden-xs">This Poll is running from {{ poll.start_date }} to {{ poll.end_date }}.</span></i>
SELECT COUNT("polls_pollvote"."id") AS "id__count" FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 7)SELECT ••• FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 7)
6 similar queries.
0.24
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_num_votes(92)
return PollVote.objects.filter(poll=self, option__isnull=False).aggregate(Count('id'))['id__count'] or 0
SELECT "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", COUNT("polls_pollvote"."id") AS "num" FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 5) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value" ORDER BY 4 DESCSELECT ••• FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 5) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value" ORDER BY 4 DESC
2 similar queries.
Duplicated 2 times.
0.52
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_results(85)
total = sum(v['num'] for v in votes)
2
3
{% if poll.user_vote or request.user.is_anonymous or poll.is_past %}
4
<div id="poll_pie_{{ poll.id }}"></div>
5
{% for vote in poll.get_results %}
6
{% empty %}
7
<p class="text-center">No results to be displayed yet</p>
SELECT "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", COUNT("polls_pollvote"."id") AS "num" FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 5) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value" ORDER BY 4 DESCSELECT ••• FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 5) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value" ORDER BY 4 DESC
2 similar queries.
Duplicated 2 times.
0.40
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_results(85)
total = sum(v['num'] for v in votes)
29
<script type="text/javascript">
30
var chart_data = [
31
{# escapejs required to render quotes in option text #}
SELECT COUNT(*) AS "__count" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '5' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '5' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")
6 similar queries.
3.39
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
context[self.as_varname] = self.get_context_value_from_queryset(context, qs)/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
return qs.count()
42
{% else %}
43
<span class="hidden-xs">This Poll is running from {{ poll.start_date }} to {{ poll.end_date }}.</span></i>
SELECT COUNT("polls_pollvote"."id") AS "id__count" FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 5)SELECT ••• FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 5)
6 similar queries.
0.17
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_num_votes(92)
return PollVote.objects.filter(poll=self, option__isnull=False).aggregate(Count('id'))['id__count'] or 0
SELECT "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color", COUNT("polls_pollvote"."id") AS "num" FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 4) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASCSELECT ••• FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 4) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASC
5 similar queries.
0.99
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_results(77)
total = sum(v['num'] for v in votes)
1
{% if poll.user_vote or request.user.is_anonymous or poll.is_past %}
2
{% for vote in poll.get_results %}
3
<div class="row pb-6">
4
<div class="col-sm-3 col-md-2">
5
{% if poll.user_vote.option_id == vote.option__id %}(voted){% endif %}
SELECT COUNT(*) AS "__count" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '4' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '4' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")
6 similar queries.
2.51
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
context[self.as_varname] = self.get_context_value_from_queryset(context, qs)/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
return qs.count()
42
{% else %}
43
<span class="hidden-xs">This Poll is running from {{ poll.start_date }} to {{ poll.end_date }}.</span></i>
SELECT COUNT("polls_pollvote"."id") AS "id__count" FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 4)SELECT ••• FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 4)
6 similar queries.
0.26
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_num_votes(92)
return PollVote.objects.filter(poll=self, option__isnull=False).aggregate(Count('id'))['id__count'] or 0
SELECT "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color", COUNT("polls_pollvote"."id") AS "num" FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 3) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASCSELECT ••• FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 3) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASC
5 similar queries.
0.83
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_results(77)
total = sum(v['num'] for v in votes)
1
{% if poll.user_vote or request.user.is_anonymous or poll.is_past %}
2
{% for vote in poll.get_results %}
3
<div class="row pb-6">
4
<div class="col-sm-3 col-md-2">
5
{% if poll.user_vote.option_id == vote.option__id %}(voted){% endif %}
SELECT COUNT(*) AS "__count" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '3' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '3' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")
6 similar queries.
2.28
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
context[self.as_varname] = self.get_context_value_from_queryset(context, qs)/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
return qs.count()
42
{% else %}
43
<span class="hidden-xs">This Poll is running from {{ poll.start_date }} to {{ poll.end_date }}.</span></i>
SELECT COUNT("polls_pollvote"."id") AS "id__count" FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 3)SELECT ••• FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 3)
6 similar queries.
0.23
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_num_votes(92)
return PollVote.objects.filter(poll=self, option__isnull=False).aggregate(Count('id'))['id__count'] or 0
SELECT "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color", COUNT("polls_pollvote"."id") AS "num" FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 1) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASCSELECT ••• FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 1) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASC
5 similar queries.
0.59
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_results(77)
total = sum(v['num'] for v in votes)
1
{% if poll.user_vote or request.user.is_anonymous or poll.is_past %}
2
{% for vote in poll.get_results %}
3
<div class="row">
4
<div class="col-sm-3 col-md-2">
5
{% if poll.user_vote.option_id == vote.option__id %}(voted){% endif %}
SELECT COUNT(*) AS "__count" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '1' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '1' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")
6 similar queries.
1.49
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
context[self.as_varname] = self.get_context_value_from_queryset(context, qs)/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
return qs.count()
42
{% else %}
43
<span class="hidden-xs">This Poll is running from {{ poll.start_date }} to {{ poll.end_date }}.</span></i>
SELECT COUNT("polls_pollvote"."id") AS "id__count" FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 1)SELECT ••• FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 1)
6 similar queries.
0.24
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_num_votes(92)
return PollVote.objects.filter(poll=self, option__isnull=False).aggregate(Count('id'))['id__count'] or 0
SELECT "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color", COUNT("polls_pollvote"."id") AS "num" FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 2) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASCSELECT ••• FROM "polls_pollvote" INNER JOIN "polls_polloptions" ON ("polls_pollvote"."option_id" = "polls_polloptions"."id") WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 2) GROUP BY "polls_pollvote"."option_id", "polls_polloptions"."text", "polls_polloptions"."value", "polls_polloptions"."color" ORDER BY "polls_polloptions"."value" ASC
5 similar queries.
0.99
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_results(77)
total = sum(v['num'] for v in votes)
1
{% if poll.user_vote or request.user.is_anonymous or poll.is_past %}
2
{% for vote in poll.get_results %}
3
<div class="row">
4
<div class="col-sm-3 col-md-2">
5
{% if poll.user_vote.option_id == vote.option__id %}(voted){% endif %}
SELECT COUNT(*) AS "__count" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '2' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 196 AND "django_comments"."object_pk" = '2' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")
6 similar queries.
5.45
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
context[self.as_varname] = self.get_context_value_from_queryset(context, qs)/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
return qs.count()
42
{% else %}
43
<span class="hidden-xs">This Poll is running from {{ poll.start_date }} to {{ poll.end_date }}.</span></i>
SELECT COUNT("polls_pollvote"."id") AS "id__count" FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 2)SELECT ••• FROM "polls_pollvote" WHERE ("polls_pollvote"."option_id" ISNOT NULLAND "polls_pollvote"."poll_id" = 2)
6 similar queries.
0.33
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./polls/views.py in all_polls(36)
return render(request, 'polls/all_polls.html', {'polls': polls})/home/nathan/rb/site/./polls/models.py in get_num_votes(92)
return PollVote.objects.filter(poll=self, option__isnull=False).aggregate(Count('id'))['id__count'] or 0