Answer the question
In order to leave comments, you need to log in
One queryset in different Django templates?
I now use the same queryset in the navigation menu to display in different templates, passed through a context variable.
def index(request):
context = {
'exhibitions_list' : Exhibitions.objects.all()
}
return render(request, 'index.html', context)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question