In Django admin, I have created a Name object with name: \"United Kingdom\". I then create a Nation object with the Name object I\'ve just created, and a path to a flag image. <
Use unicodes in __unicode__()
method i.e.
u'Name: ' + self.name
and
u'Nation: ' + self.name
Without unicode in 'Nation: ' + self.name
, it will try to get string representation which is not defined for Name
object.
The change that fixed the problem:
'Name: ' + self.name.name
That way I'm correctly referring to the name column in the name table.