python - AttributeError : 'module' object has no attribute 'index' -
i'm going through official tutorial provided on django's documentation site, , have encountered attributeerror. here's code i'm working : 'polls' name of application. views.py from django.http import httpresponse def index(request): return httpresponse("hello, world. you're @ poll index.") \polls\urls.py from django.conf.urls import patterns, url polls import views urlpatterns = patterns('', url(r'^$', views.index, name='index') ) urls.py from django.conf.urls import patterns, include, url django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # examples: # url(r'^$', 'mysite.views.home', name='home'), url(r'^blog/', include('blog.urls')), url(r'^polls/', include('polls.urls')), url(r'^admin/', include(admin.site.urls)), ) error: attributeerror @ /polls 'module' object has