﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19413	[model].__str__() disagrees with __unicode__() using python3 / django1.5b1	xanthraxoid@…	nobody	"I created a few models, providing each with a __unicode__() method as described at [1] and in the admin area, when I look at a list of such objects, each is listed as [Class Name] object rather than the text representation defined in my __unicode__() methods.

I used python2.7 and got the expected results, I also defined __str__() to return self.__unicode__() and again got the expected results.

I assume this is something to do with python3's handling of unicode/byte-strings, but it seems to me that one of the following three is needed:

1) the __str__() function should continue to return the same text representation as the __unicode__() method unless overridden
2)the admin should use __unicode__() in place of __str__() - along with any other part of django
3) the docs should be updated to make it clear what I should do in this situation (I'll stick with defining __str__() to return the same as __unicode__() for now, but I'd rather not have to, DRY and all that...

[1]
https://docs.djangoproject.com/en/dev/intro/tutorial01/
https://docs.djangoproject.com/en/dev/topics/db/models/

NB eveywhere you see __unicode__(), the bug tracker software has helpfully converted my double underlines before and after the function name into underlining the function name - sorry!

Cheers & God bless
    Sam ""SammyTheSnake"" Penny"	Bug	closed	Python 3	1.5-beta-1	Normal	invalid	str unicode admin		Unreviewed	0	0	0	0	0	0
