The situation is the following. We render a view.
return render(request, 'test.html', {'db_object': db_object, 'dict': dict }
In the template we would now like to access the dictionary with db_object.key
. In python you would normally do dict[db_object.key]
. In the template you could do {{ dict.some_key }}
to access the value. But in the following situation you obviously can't do {{ dict.db_object.key }}
Is there a way to accomplish this?