Coverage for website/education/templatetags/frontpage_summaries.py: 90.00%
8 statements
« prev ^ index » next coverage.py v7.6.7, created at 2025-08-14 10:31 +0000
« prev ^ index » next coverage.py v7.6.7, created at 2025-08-14 10:31 +0000
1from django import template
3from education.models import Summary
5register = template.Library()
8@register.inclusion_tag("education/frontpage_summaries.html", takes_context=True)
9def render_frontpage_summaries(context, summaries=None):
10 if summaries is None: 10 ↛ 13line 10 didn't jump to line 13 because the condition on line 10 was always true
11 summaries = Summary.objects.filter(accepted=True).order_by("-uploader_date")[:6]
13 return {"summaries": summaries}