Saturday, October 31, 2009

Django: displaying an image inside the admin (change form)

Hi,

being a Django newbiew, i've been searching all over for how to
display an image
inside the admin's change_form - that is, the page where we edit the
records for a model.

although i've managed to show a thumbnail image in the display_list
view of the admin
inside the editing form, i have no clue how to do it.

i tried venturing into the "fieldset.html" inside the django/contrib/
admin/templates directory
which also doesn't help since it iterates all the fieldset items
provided to it by the view
but i haven't been able to find the view, nor even if i did, django is
so generic
it would be meaningless to change something in the original code, and
affect
all projects....

isn't there a way to display an already existant image (in the model)
inside a change form?
right now it only displays the full path of the image, and the the
file input type, which is ok.
but i also want the image to be shown at the same spot.

hope you guys will be able to help

10k ya all :)
Liam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate