# Didn't return an HttpResponse object. It returned None instead

**URL:** <https://forum.freecodecamp.org/t/didnt-return-an-httpresponse-object-it-returned-none-instead/216155>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [August 9, 2018, 12:18pm UTC](https://forum.freecodecamp.org/t/didnt-return-an-httpresponse-object-it-returned-none-instead/216155 "2018-08-09T12:18:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alayo](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@alayo](https://forum.freecodecamp.org/u/alayo)\
**Post date:** [August 9, 2018, 12:18pm UTC](https://forum.freecodecamp.org/t/didnt-return-an-httpresponse-object-it-returned-none-instead/216155/1 "2018-08-09T12:18:00Z")

</div>

hi, i need help on this

```auto
def taskmanager(request,):
    todo = Exercise.objects.all()
    practices = Practice.objects.all()
    if request.method == "POST":
        if "addtask" in request.POST:
            title = request.POST["description"]
            date = str(request.POST["date"])
            practice = request.POST["practice_select"]
            description = title + "--" + date + " " + practice
            todos = Exercise(title=title, description=description, due_date=date, practice=Practice.objects.get(name=practice))

            if todo. is_valid():
                todo.save()
                return render(request, 'appnow/taskmanager.html', {})
            else:
                return render(request, 'appnow/index.html', {})

```

BUT I KEPT GETTING DIDNT RETURN AN HTTPRESPONSE OBJECT. pls what is wrong

---

<div class="post-metadata">

**Author:** ![DanCouper](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dancouper/32/158608_2.png) [@DanCouper](https://forum.freecodecamp.org/u/DanCouper)\
**Post date:** [August 10, 2018, 8:18am UTC](https://forum.freecodecamp.org/t/didnt-return-an-httpresponse-object-it-returned-none-instead/216155/2 "2018-08-10T08:18:51Z")

</div>

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See [this post](http://forum.freecodecamp.com/t/forum-code-formatting/25574) to find the backtick on your keyboard. The “preformatted text” tool in the editor (`</>`) will also add backticks around text.

![markdown_Forums](https://sea3.discourse-cdn.com/freecodecamp/uploads/default/original/3X/4/b/4b9a26f0c243380dd84935f4e29b92e3ecee8d05.gif)

---

<div class="post-metadata">

**Author:** ![stephengtuggy](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@stephengtuggy](https://forum.freecodecamp.org/u/stephengtuggy)\
**Post date:** [April 25, 2019, 11:27pm UTC](https://forum.freecodecamp.org/t/didnt-return-an-httpresponse-object-it-returned-none-instead/216155/3 "2019-04-25T23:27:11Z")

</div>

Did you still need help with this? If so, I may have a solution for you. My apologies that you did not get an answer sooner.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 17, 2021, 5:37pm UTC](https://forum.freecodecamp.org/t/didnt-return-an-httpresponse-object-it-returned-none-instead/216155/4 "2021-02-17T17:37:14Z")

</div>

Closed on February 17, 2021, 5:37pm UTC


