[Fixed]-'str' object has no attribute 'get'

31👍

You’re returning strings directly from create_transaction inside the POST block. You need to wrap them in an HttpResponse.

-3👍

open clickjacking.py of django middleware and change the following code

first import in what way you have to give response 
like in my case I have to return httpredirect so i import 
from django.http import HttpResponseRedirect
if isinstance(response, str):
        response = HttpResponseRedirect(response)
add this code into process_response of clickjacking.py
👤iqbal

Leave a comment