You can use here something like `{% if ng_reports.count() > 10 %}` and remove the relevant section from the views.py. Also the line below needs indenting.