Answer the question
In order to leave comments, you need to log in
Python, Django: How to merge two datasets into one variable?
There are 2 data sets that need to be combined into one variable, then to be passed to the template. How can this be done?
Thanks in advance for your reply
user = User.objects.get(id=user_id)
user_info = UserInfo.objects.get(user_id=user_id)
Answer the question
In order to leave comments, you need to log in
return render(request, 'template.html', {'user': user, 'user_info': user_info})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question