First django project,showing error no module named 'polls'
<p>I followed the Django official document,and I am writing the poll app.</p>

<p>And  in the mysite package, it says   No module named 'polls' when I run it,how can I solve it?</p>

<p>my python is 3.6,my Django is 1.10.2,</p>

<p>this is my directory</p>

<pre><code>âââ db.sqlite3
âââ manage.py
âââ mysite
â   âââ __init__.py
â   
â   âââ __pycache__
â   âââ settings.py
â   
â   âââ urls.py
â   âââ wsgi.py
âââ polls
    âââ __init__.py
    âââ __pycache__
    âââ admin.py
    âââ models.py
    âââ tests.py
    âââ urls.py
    âââ views.py
    âââ apps.py
</code></pre>

<p>mysite\urls.py</p>

<pre><code>from django.conf.urls import include, url
from django.contrib import admin
import polls
urlpatterns = [
    url(r'^polls/', include('polls.urls')),
    url(r'^admin/', admin.site.urls),
   ]
</code></pre>

<p>INSTALLED_APPS in settings.py</p>

<pre><code> INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'polls',

 ]
</code></pre>

<p>And there is another problem in the document,the document types:</p>

<pre><code>from django.conf.urls import url

from . import views

urlpatterns = [
url(r'^$', views.index, name='index'),
   ]
</code></pre>

<p>When i run it,it says cannot import name 'views',i delete the from .,then it works.But the problem above still don't solve,can anyone tell me why??</p>

<p>Sounds like you don't have the <code>polls</code> app installed.</p>

<p>Go to <code>settings.py</code>, inside it find <code>INSTALLED_APPS = [...]</code> and add <code>'polls',</code> to that list.</p>

python django