title: Django NameError: name 'views' is not defined
body: <p>I am working through <a href="http://code.tutsplus.com/tutorials/rapid-website-deployment-with-django-heroku-new-relic--cms-21543" rel="noreferrer">this tutorial</a> on rapid site development with <code>Django.</code> </p>
  
  <p>I have followed it exactly (as far as I can see), but get the following error when I try to view the index page:</p>
  
  <pre><code>NameError at /name 'views' is not defined
  Exception location: \tuts\urls.py in &lt;module&gt;, line 12
  </code></pre>
  
  <p>Here's <em><code>urls.py</code></em>:</p>
  
  <pre><code>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'),
  )
  </code></pre>
  
  <p>Here's <em><code>views.py</code></em>:</p>
  
  <pre><code>from django.shortcuts import render
  
  # Create your views here.
  def index(request):
      items = Item.objects.order_by("-publish_date")
      now = datetime.datetime.now()
      return render(request,'portfolio/index.html', {"items": items, "year": now.year})
  </code></pre>
  
  <p>And here's <em><code>models.py</code></em>:</p>
  
  <pre><code>from django.db import models
  
  # Create your models here.
  class Item(models.Model):
      publish_date = models.DateField(max_length=200)
      name = models.CharField(max_length=200)
      detail = models.CharField(max_length=1000)
      url = models.URLField()
      thumbnail = models.CharField(max_length=200)
  </code></pre>
  
  <p>I also have a basic <code>index.html</code> template in place. From looking around I think I need to import my view somewhere.</p>
  
  <p>But I'm completely new to Django so I have no clue. Any ideas?</p>