D
D
DmitryRise2017-09-17 23:36:57
Django
DmitryRise, 2017-09-17 23:36:57

Why is the queryset inferred directly into the template?

I have a queryset for a fetch request

next = Articles.objects.values('slug').order_by('pub_time').first()

I output {{ next }} in the template, but I get: Tell me, please, what is the problem?
<a href="{'slug': '123'}">Следующий</a>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Konin, 2017-09-17
@jkjkjirf

.values ​​returns a dictionary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question