[Answer]-Django 1.6 : TypeError render_to_string() got multiple values for keyword argument 'context_instance'

1👍

You are passing in an argument too many; you are passing in d as the template dictionary, and then a different dictionary as a fourth argument; this means the dictionary is being passed in as the context_instance argument, and that’s failing here.

Combine d and the extra dictionary, passing in just one dictionary:

d.update({'doctor': profile, 'UGC': UserContent.objects.all(), 'average': average})
return render(request, 'meddy1/docprofile.html', d)

Leave a comment