I’m getting the following error: pastebin.com/KTT6VkEp
My code for the view.py is: pastebin.com/rx44dbgy
I followed the book and walkthrough, and my code looks like yours, where did I go wrong?
Chapter 9 - Errors I can't fix
mkattam
#1
djgrubbs
#2
I am not for certain but it looks like your else statement on line 34 is indented too far over. It needs to match up with the line:
if request.method == ‘POST’:
Could be wrong though since I just finished the book yesterday and don’t have much django experience outside of the book.
limedaring
#3
What djgrubbs said! That’s the thing about Python… you really gotta make sure your indents are correct. Too much indenting and Python ignores it, which is why you got the error. :)
mkattam
#4
Thanks. Now the error is gone - due to fixed indentation. But then form was absent when I click edit me, and that is when I realized I had {% cotent block %} instead of {% content block %}. All’s fixed now. Thanks for the help everyone.