"The view polls.views.index didn't return an HttpResponse object. It returned None instead." Error in Django
<p>I am following the tutorial in Django documentation. I did exactly as it has said in the <a href="https://docs.djangoproject.com/en/1.10/intro/tutorial01/" rel="nofollow">tutorial</a>.</p>

<p>ValueError at /polls/</p>

<p>When I load on browser "<a href="http://localhost:8000/polls/" rel="nofollow">http://localhost:8000/polls/</a>" I get this error:</p>

<pre><code>The view polls.views.index didn't return an HttpResponse object. It returned None instead.

Request Method:     GET
Request URL:    http://localhost:8000/polls/
Django Version:     1.10.1
Exception Type:     ValueError
Exception Value:    

The view polls.views.index didn't return an HttpResponse object. It returned None instead.

Exception Location:     /home/jack/anaconda2/envs/py3k/lib/python3.4/site-packages/django/core/handlers/base.py in _get_response, line 198
Python Executable:  /home/jack/anaconda2/envs/py3k/bin/python
Python Version:     3.4.5
Python Path:    

['/home/jack/Documents/Django Learning/mysite',
 '/home/jack/anaconda2/envs/py3k/lib/python34.zip',
 '/home/jack/anaconda2/envs/py3k/lib/python3.4',
 '/home/jack/anaconda2/envs/py3k/lib/python3.4/plat-linux',
 '/home/jack/anaconda2/envs/py3k/lib/python3.4/lib-dynload',
 '/home/jack/anaconda2/envs/py3k/lib/python3.4/site-packages/Sphinx-1.4.1-py3.4.egg',
 '/home/jack/anaconda2/envs/py3k/lib/python3.4/site-packages/setuptools-23.0.0-py3.4.egg',
 '/home/jack/anaconda2/envs/py3k/lib/python3.4/site-packages']

Server time:    Thu, 6 Oct 2016 10:32:20 +0000
</code></pre>

<p>Code Of mysite/polls/views.py</p>

<pre><code>from django.shortcuts import render
from django.http import HttpResponse

def index(request):
    HttpResponse("Welcome to poll's index!")
# Create your views here.
</code></pre>

<p><code>HttpResponse("Welcome to poll's index!")</code>  .should be </p>

<pre><code>return HttpResponse("Welcome to poll's index!")
</code></pre>

<p>You are not returning anything from your view.</p>

python django anaconda