title: Error with "__str__ returned non-string (type int)"
body: <p>I have a problem with a Django Project. </p>
  
  <p>I'll be direct. I am connecting my Django admin to a database that I have on a server, the problem is that when accessing the models in the browser, throws the following error:</p>
  
  <pre><code>TypeError at /admin/crm/asentamiento/78967/
  __str__ returned non-string (type int)
  Request Method: GET
  Request URL:    http://127.0.0.1:8080/admin/crm/asentamiento/78967/
  Django Version: 1.8
  Exception Type: TypeError
  Exception Value:    
  __str__ returned non-string (type int)
  Exception Location: C:\Spameando\crm_denue2\myvenv\lib\site-packages\django\utils\encoding.py in force_text, line 90
  Python Executable:  C:\Spameando\crm_denue2\myvenv\Scripts\python3.exe
  Python Version: 3.4.4
  </code></pre>
  
  <p>And the code for my model is this:</p>
  
  <pre><code>class Asentamiento(models.Model):
      id_asentamiento = models.AutoField(primary_key=True)
      nom_asentamiento = models.CharField(max_length=150)
      tipo_centro = models.CharField(max_length=100)
      nom_centro = models.CharField(max_length=100)
      num_local = models.CharField(max_length=20)
      tipo_asentamiento_id_tipo_asent = models.ForeignKey('TipoAsentamiento', db_column='tipo_asentamiento_id_tipo_asent')
      codigo_postal_id_codpostal = models.ForeignKey('CodigoPostal', db_column='codigo_postal_id_codpostal')
      localidad_id_localidad = models.ForeignKey('Localidad', db_column='localidad_id_localidad')
  
      class Meta:
          managed = False
          db_table = 'asentamiento'
  
      def __str__(self):
              return self.nom_asentamiento
  </code></pre>
  
  <p>I have no idea what the problem is, since I have done the model many times and I always throw the same error, in all other tables and models I have no problem.</p>
  
  <p>The error occurs when I click on some value of my model to see in a window the selected value.</p>