title: Name is not defined in Django model
body: <p>I have a Django app with the following in its <strong>models.py</strong> file:</p>
  
  <pre><code>from django.db import models
  
  class Event(models.Model):
      date = models.DateField()
      name = models.TextField(max_length=60)
      venue = models.ForeignKey(Venue)
  
      def __unicode__(self):
          return self.name
  
  class Venue(models.Model):
      name = models.TextField(max_length=60)
      street_address = models.TextField(max_length=60)
      locality = models.TextField(max_length=60)
      region = models.TextField(max_length=60)
      postal_code = models.TextField(max_length=60)
      country_name = models.TextField(max_length=60)
      latitude = models.DecimalField(max_digits=9, decimal_places=6)
      longitude = models.DecimalField(max_digits=9, decimal_places=6)
  
      def __unicode__(self):
          return self.name
  </code></pre>
  
  <p>But when I run <code>python manage.py syncdb</code> I get the following error:</p>
  
  <blockquote>
    <p>NameError: name 'Venue' is not defined</p>
  </blockquote>
  
  <p>Why is this when <code>class Venue</code> is in the file? Have I done something wrong? I’ve just been following the Django tutorial at <a href="https://docs.djangoproject.com/en/1.5/intro/tutorial01/">https://docs.djangoproject.com/en/1.5/intro/tutorial01/</a>.</p>