Django annotated value in template
问题 Is it possible to access annotated values on querysets in templates? For example I have the following queryset that I'm passing to my template: context[videos] = Videos.objects.annotate(view_count=Count(views)).order_by(view_count)[:100] In my template I'm trying to get the view count like this: {% for video in videos %} {{ video.view_count }} {% endfor %} Which displays nothing. However if I use: {{ video.views.count }} It seems fine - but i believe the second option recalculates the view