I am doing the django tutorial so I am literally cutting and pasting code. I keep getting this error on step 1
from django.conf.urls import url
from django.conf.urls import include
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
I am getting this error
*/django/theSite/polls/urls.py", line 8, in <module>
url(r'^$', views.index, name='index'),
AttributeError: 'module' object has no attribute 'index'
edit: my views module is this
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the polls index.")
I cant see what I missed do you have any advice? Thanks!