#10830 closed (invalid)
ManyRelatedManager needs a __unicode__() method
Description ¶
ManyRelatedManager class in django.db.models.fields.related needs a unicode() (and str()?) method. Without it my inline form within the admin was creating incorrect SQL and causing an error.
This is what I added:
def __str__(self): return unicode(self._pk_val).encode('utf-8') def __unicode__(self): return unicode(self._pk_val)
Note:
See TracTickets
for help on using tickets.
No, it doesn't. You are somehow using something incorrectly, please use either #django or django-users mailing list for asking for support.