Fun and Obscure Django 500 errors
I learned the hard way when I tried to serialize a Model Object into the Django HttpResponse object from a dictionary for sending back to an ajax call...
Sometimes it's not obvious even with Django having the Debug enabled...the logs didn't say where it was.
Here's sample code:
https://github.com/FlowStacks/email-voting/blob/master/stacks_site/apps/back_end/api_methods.py#L445
I thought about putting a try/except around it, but there's got to be a better way.
Any thoughts?
Written by Jay
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#