Editing Image upload - The view didn't return an HttpResponse object. It returned None instead


#1

I’m trying to allow users to edit the images they’ve uploaded, but am getting this error:
“The view collection.views.edit_person_uploads didn’t return an HttpResponse object. It returned None instead.” Here’s a link with the full text. I’ve compared my code with the source code on github, but I couldn’t figure out where I going wrong. Here is my code so far; I’m using “person” instead of “thing”.

Here are my relevant python files and the relevant html files.

Thanks, and have a happy Thanksgiving!


#2

Looks like you have an extra indentation in edit_person_uploads. If the view is accessed not through POST, the view won’t return anything (ergo, the None response). :)


#3

Thank you so much for your quick response (and especially on a holiday)!

I tried taking your code off github and just changing “things” to “persons”, but still got the same error, and am also getting the same error for the url http://localhost:8000/persons/rad/edit/email/ url as well (and tried a few different users for both). Do you (or anyone in this forum) have any thoughts about what else might be the issue?


#4

Did you go through and confirm that your indentation is correct?