Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#10830 closed (invalid)

ManyRelatedManager needs a __unicode__() method

Reported by: Joshua Russo Owned by: nobody
Component: Database layer (models, ORM) Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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)

Change History (2)

comment:1 by Alex Gaynor, 15 years ago

Resolution: invalid
Status: newclosed

No, it doesn't. You are somehow using something incorrectly, please use either #django or django-users mailing list for asking for support.

comment:2 by Jacob, 13 years ago

milestone: 1.0.3

Milestone 1.0.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top