title: Django Cannot import name views
body: <p>So I'm trying to get up to speed on Django for a side project by doing the "first Django app" thing at DjangoProject, but I'm getting this weird message when I try to set up views for the first time.</p>
  
  <pre><code>ImportError at /index
  cannot import name views
  Request Method: GET
  Request URL:    http://localhost:8000/index
  Django Version: 1.5.4
  Exception Type: ImportError
  Exception Value:    
  cannot import name views
  Exception Location: /Users/Dev/Desktop/socialSignIn/socSignInLocater/polls/admin.py in &lt;module&gt;, line 2
  Python Executable:  /usr/bin/python
  Python Version: 2.7.2
  Python Path:    
  ['/Users/Dev/Desktop/socialSignIn/socSignInLocater',
   '/Library/Python/2.7/site-packages/setuptools-1.1.6-py2.7.egg',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
   '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
   '/Library/Python/2.7/site-packages']
  Server time:    Thu, 3 Oct 2013 15:58:02 -0400
  </code></pre>
  
  <p>It says that the error is in my root/polls/admin.py on line two, and seems to complain about not being able to import "views". The problem is that I am not trying to import views in </p>
  
  <pre><code>admin.py
  
  #admin.py
  from django.contrib import admin
  from polls.models import Choice
  from polls.models import Poll
  # admin.site.register(Poll)
  
  class ChoiceInline(admin.TabularInline):
      model = Choice
      extra = 1
  
  class PollAdmin(admin.ModelAdmin):
      fields = ["pub_date", "question"]
      inlines = [ChoiceInline]
      list_display = ("question", "pub_date", "was_published_recently")
      list_filter = ['pub_date']
      sarch_fields = ['question']
      date_heirarchy = 'pub_date'
  
  admin.site.register(Poll, PollAdmin)
  
  # admin.site.register(Choice)
  </code></pre>
  
  <p>The error message also indicates that the issue is the import call to the Choice model, but that doesn't call views either.</p>
  
  <pre><code>#models.py
  from django.db import models
  import datetime
  from django.utils import timezone
  
  # Create your models here.
  
  class Poll(models.Model):
      question = models.CharField(max_length=200)
      pub_date = models.DateTimeField('date_published')
      def __unicode__(self):
          return self.question
      def was_published_recently(self):
          return self.pub_date &gt;= timezone.now() - datetime.timedelta(days=1)
  
  class Choice(models.Model):
      poll = models.ForeignKey(Poll)
      choice_text = models.CharField(max_length=200)
      votes = models.IntegerField(default=0)
      def __unicode__(self):
          return self.choice_text
  </code></pre>
  
  <p>Any ideas as to how to fix this?</p>
  
  <p>Update:</p>
  
  <pre><code>#views.py
  from django.http import HttpResponse
  # from django.views.generic.base import TemplateView
  
  def index(request):
      return HttpResponse("You found the Poll Index.")
  
  #urls.py
  from django.conf.urls.defaults import * #patterns, url
  #
  from polls import views
  
  urlpatterns = patterns('',
      url(r'^$', views.index, name='index')
  )
  </code></pre>
  
  <p>UPDATE #2: 
  Oddly enough if I comment out the entire admin.py file, and redefine the <code>from polls import views</code> to <code>import views</code> then it works, but in doing so I've killed my admin section. Any ideas?</p>