AttributeError: 'module' object has no attribute 'urls'
<p>Python 2.7 &amp; Django 1.10
ERROR:</p>

<pre><code>AttributeError: 'module' object has no attribute 'urls' 
</code></pre>

<p><strong>main/urls.py</strong></p>

<pre><code>from django.conf.urls import url, include
from django.contrib import admin
import article

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include(article.urls))

]
</code></pre>

<p><strong>article/urls.py</strong></p>

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

urlpatterns = [

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

<p>Structure:</p>

<p>APP/main/urls.py</p>

<p>APP/article/urls.py</p>

<p>In main/urls.py</p>

<pre><code>from django.conf.urls import url, include
from django.contrib import admin
from article import urls

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include(urls))

]
</code></pre>

<p>Or</p>

<pre><code>from django.conf.urls import url, include
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include('article.urls'))

]
</code></pre>

<p>You can learn more from <a href="https://docs.djangoproject.com/en/1.10/topics/http/urls/#including-other-urlconfs" rel="nofollow">Django Documentation</a> </p>

python django python-2.7 web