title: Strange "DoesNotExist" exception in Django
body: <p>There is a simple code:</p>
  
  <pre><code>    class City(models.Model):
          slug = models.SlugField(max_length=150, unique=True)
          name = models.CharField(max_length=255)
  
  
      class CityPart(models.Model):
          city = models.ForeignKey('City', related_name='rel_cityparts')
          slug = models.SlugField(max_length=150, unique=True)
          name = models.CharField(max_length=255)
  
          def __unicode__(self):
              #return self.name
              return u'%s (%s)' % (self.name, self.city.name)
  </code></pre>
  
  <p>I found that in <code>__unicode__</code> method fails, leading to <code>DoesNotExist</code> exception. Django "thinks" the related city does not exist, thought it exists for sure. I have re-checked it, the DB is valid. I used Sqlite and Postgres, both loads\dumps the DB data but both raises this exception. So I <em>think</em> it's related to some code issues, not to the DB inconsistency.</p>
  
  <p>The full traceback is here (really uninformative): <a href="http://dpaste.com/hold/1429873/" rel="nofollow">http://dpaste.com/hold/1429873/</a></p>
  
  <p>When I'm checking the value in the file <code>virtenv_macos/lib/python2.7/site-packages/debug_toolbar/panels/template.py</code>, line 85 <code>(*pformat(value)*)</code> - it tells me that the "value" variable has the following value: <code>*[broken repr (DoesNotExist)]*</code></p>
  
  <p>MacOS, Python 2.7, Django 1.5.2</p>
  
  <p>P.S. The exception raises when I'm trying to see the list of DB records (ListView), not when I'm trying to create a new one.</p>