Saturday, December 29, 2012

Getting Access to Object in Admin Panel

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 doing this?

def return_unicode(obj):
    return obj.__unicode__()

class PictureAdmin(admin.ModelAdmin):
    list_display = (return_unicode,'uploader','image','rated','approved',)

Thank You ahead of time.

You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment