[Answer]-Django Responds code 500 no matter what

1👍

Almost certainly, one or more of those fields is not being sent, so you are getting a KeyError. If you set DEBUG to True you would see the traceback.

You should be using Django’s forms framework, instead of directly accessing the POST data. That will validate the input and allow you to display any errors.

Leave a comment