# Views.py @csrf_exempt def stats(request): obj = statistics.objects.filter(username='user_n1', action='FOLLOW').order_by('-id')[:1] template = loader.get_template('statistics.html') context = { 'obj':obj } return HttpResponse(template.render(context, request)) # statistics.html file {% if obj %} {% else %}

No stats are available.

{% endif %} # My question how could I subtract datenow from date from sql? # I do not know how can I access the date column from all these