Hi Shubham,
On 01/07/2019 18.52, Shubham Chauhan wrote:
> hi folks, i'm beginner in django and i try to make a to-do list app and
> this error comes please help me out
>
In Python, if a function doesn't return anything, it will implicitly
return "None".
If you look at your "homepage" function, you actually have three places
the function can return, but only two explicit returns (which return an
HttpResponse as the error message informs you is required).
Knowing that, try to consider what will happen if the form is *not*
valid, ie. the call to "form.is_valid()" returns false.
Hope that can point you in the right direction.
I could just give you answer, but if you want to learn, I think it's
better you try to figure it out yourself.
Kind regards,
Kasper Laudrup