2👍
✅
In your project urls.py, you cannot include an application’s view files in urlpatterns
.
url(r'about/', include('about.urls', namespace = 'About_page')), )
And in about/urls.py
from django.conf.urls import patterns, url
from about import views
urlpatterns = patterns('',
url(r'^$', views.index, name = 'index'),)
If there is only one url in about/urls.py, then you can directly put it in urls.py of project.
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url(r'home/', include('home.urls', namespace = 'home')),
url(r'^about/$', 'about.views.index', name="About_page_index"),
)
Source:stackexchange.com