#4921: django.contrib.admin calls str() on model instances, not unicode()
---------------------------------------------------------+------------------
Reporter: Ludvig Ericson <[EMAIL PROTECTED]> | Owner:
adrian
Status: new |
Component: Admin interface
Version: SVN |
Resolution:
Keywords: admin unicode listing |
Stage: Unreviewed
Has_patch: 0 |
Needs_docs: 0
Needs_tests: 0 |
Needs_better_patch: 0
---------------------------------------------------------+------------------
Comment (by Ludvig Ericson <[EMAIL PROTECTED]>):
I get a lot of {{{XYZ object}}}. Notice that I'm not talking about the
models, but the model *instances.*
1. Create a model with any number of attributes (fields).
2. Create a {{{___str___}}} method on said model, which returns anything
you'd like.
3. Add an empty Admin class.
4. Create a pair of models of aforementioned model class.
5. Find the model listing page in the admin for this model. E.g.
{{{/admin/foo/}}}
The admin should now say "Foo object" twice.
--
Ticket URL: <http://code.djangoproject.com/ticket/4921#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---