I work through this quick site development tutorial with Django.
I watched him closely (as far as I can see), but when I try to view the index page I get the following error:
NameError at /name 'views' is not defined Exception location: \tuts\urls.py in <module>, line 12
Here urls.py :
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^$', views.index, name='index'), )
Here views.py :
from django.shortcuts import render
And here models.py :
from django.db import models
I also have a basic index.html template. Looking around, I think I need to import my look somewhere.
But I'm completely new to Django, so I have no idea. Any ideas?
source share