1

I am sending POST request from client to the application. On the server side it processed this way:

def report(request):

if request.method == "POST":
    dict = request.POST
    idea = dict["idea"]
    print idea
    return HttpResponse("Success")

If idea = "binding" (or any English word) I get http 200 OK

but on the other hand if idea = "связка" (Russian word), I am getting 500 Error

Could you please suggest a way to fix the issue?


Example of post dictionary:

<QueryDict: {u'tournament': [u''], u'sidetomove': [u'true'], 
u'idea': [u'\u0441\u0432\u044f\u0437\u043a\u0430']}>

1 Answer 1

1

You are getting an error while printing idea. Try this:

print repr(idea)

This is most probably because of a UnicodeDecodeError.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.