Code

#20710 closed Uncategorized (invalid)

Objects not displaying properly in Django 1.5 using Python 3.3

Reported by: andrew@… Owned by: nobody
Component: contrib.admin Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Even after specifying a unicode method for my models, in the admin site, it shows them as generic "Item object" types. Rechecked using Python 2.7.3 and Django 1.5 and the display is fine.

Attachments (0)

Change History (1)

comment:1 Changed 10 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

On Python 3, you should implement __str__() rather than __unicode__() -- see the note under this heading: https://docs.djangoproject.com/en/dev/ref/models/instances/#other-model-instance-methods

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.