title: Django: NameError 'Business' is not defined
body: <p>Not sure what is causing this error. Please help</p>
  
  <pre><code>NameError at /dash/
  name 'Business' is not defined
  
  Exception Location: /home/src/common/models.py in ImageBank, line 38
  </code></pre>
  
  <p>Here's the model:</p>
  
  <pre><code>class Business(models.Model):
      business_type = models.ManyToManyField(BusinessType)
      business_service_type = models.ManyToManyField(ServiceType)
      establishment_type = models.ForeignKey(EstablishmentType)
      logo = models.ForeignKey(ImageBank)
      phone = PhoneNumberField()
      address = models.ForeignKey(Address)
      website = models.URLField()
      name = models.CharField(max_length=64)
  
      def __unicode__(self):
          return self.name
  </code></pre>
  
  <p>The View: </p>
  
  <pre><code>def dashview(request):
      coupon = Coupon.objects.filter()
      bdnspk = request.user.id
      user = request.user.username
      bdns = Business.objects.values('name').get(id=bdnspk)
      context = {
          'coupon':coupon,
          'bdns':bdns,
          'user':user
  
  
      }
      return render_to_response(
          'dash/dash.html',
          {},
          context,
          context_instance = RequestContext(request),
      )
  </code></pre>
  
  <p>EDIT: my models is located in /home/src/common/models.py but my django app is in /home/proj/site/ How do I import that?</p>
  
  <p>ImageBank model:</p>
  
  <pre><code>class ImageBank(models.Model):
      business = models.ForeignKey('Business')
      image = models.ImageField(upload_to="images/bank")
  
      def url(self):
          return self.image.url
  </code></pre>