Answer the question
In order to leave comments, you need to log in
How to pass context from one template to another (Django)?
I need to be able to take variables from the view context into the template it doesn't render, example:
def view(request):
context = 1
return render(request, 'file.html', {'context': context})
def view_need(request):
return render(request, 'other.html')
Answer the question
In order to leave comments, you need to log in
context cannot be set in view_need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question