[Django]-TypeError: unhashable type: 'dict' Django

5👍

Change this:

return render(request, 'ga_app/report.html', {'sessions':sessions},
                                             {'account_id':account_id},
                                             {'property_id':property_id},
                                             {'property_name':property_name},)

to this:

return render(request, 'ga_app/report.html', {'sessions': sessions,
                                              'account_id': account_id,
                                              'property_id':property_id,
                                              'property_name':property_name}
)

You have to pass one dict as the context. You are passing 4 of them!

👤nik_m

Leave a comment