title: How do you fix: NameError: name 'poll' is not defined in Django?
body: <p>I am doing the Django tutorial, where I created a model, did syncdb, and started the python shell. However, when I run the code poll.objects.all(), it shows an error:</p>
  
  <pre><code>&gt;&gt;&gt; poll.objects.all()
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
  NameError: name 'poll' is not defined
  </code></pre>
  
  <p>No matter what I try the same error keeps coming:
      NameError: name 'poll' is not defined</p>
  
  <p>I am trying to figure out how to resolve this so I can use the various db lookup functions. I have already imported the classes:</p>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <p>from polls.models import Poll, Choice</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>How do you fix this? </p>