Answer the question
In order to leave comments, you need to log in
How to display two variables at once in a django template?
How can I display two views at once in a template? the context processor will not work, right now I'm looking at the template tag, in what cases is it needed at all? Or does it not work either?
Answer the question
In order to leave comments, you need to log in
var1 = Model1.objects.all()
var2 = Model2.objects.all()
context = { 'var1':var1 , 'var2': var}
render (request,"index.html", context)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question