I am trying the tutorial and m stuck on views. It says "AttributeError: 'module' object has no attribute 'index'"
My project/urls.py says
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^polls/', include('polls.urls')),
url(r'^admin/', include(admin.site.urls)),
)
In Views.py:
def index(request):
request HttpResponse("Hello, world. You're at the poll index.")
In app urls.py:
from django.conf.urls import patterns, url
from polls import views
ultrapatterns = patterns('',
url(r'^$', views.index, name='index')
)
Kind advise is required with some short explanation so I can understand it.
views.pyfile?