On Fri, 2009-02-27 at 12:24 -0800, Joshua Russo wrote: > Think I found a bug in the ManyRelatedManager that occurs when you try > to include a ManyToManyField relation in an admin edit page. I > personally tried to have the relational table/module as an inline > display of primary entity module. It seems to have been missing the > __unicode__ / __str__ methods. If you add the following code to the > ManyRelatedManager it seems to work fine. > > def __str__(self): > return self.__unicode__()
That's a really bad idea. __str__ must return a Python "str" object. __unicode__ must return a Python "unicode" object. So returning the result of one from the other is wrong. At a minimum, you have to do some encoding to UTF-8. As regards the general issue, I don't understand from your brief description what you are trying to do here. So, when you open a ticket for this (and that's by far the best way to propose a patch, since things on the mailing list will be forgotten or overlooked), include a very short example demonstrating how to repeat the problem -- something as simple as possible. A bug that cannot be repeated cannot be evaluated or fixed. Read the contributing document for Django to see how to generate a patch and submit it: http://docs.djangoproject.com/en/dev/internals/contributing/#internals-contributing Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---