Others have given you the answer, bit note that the correct way to call an
object's __unicode__ method is to do ` unicode(obj)`. As a general rule, you
should never call the double- underscore methods directly.
--
You received this message because you are subscribed to the Google Groups
"Djang
On Sunday, December 30, 2012 8:47:05 AM UTC+1, donarb wrote:
>
> You can code a string that references the __unicode__ method:
>
> list_display = ('__unicode__', ...
>
ref:
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display
--
You received
You can code a string that references the __unicode__ method:
list_display = ('__unicode__', ...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/t0v9rTmc
After overriding list_display, I noticed that I lost access to being able
to directly click on the object to view all its fields in the control
panel. Hence, I needed to resort to defining return_unicode. I know that
theres definitely a better way to approach it, so whats the 'Django' way of
do
4 matches
Mail list logo