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
From: "ssteinerX@gmail.com" <ssteinerx@gmail.com>
To: django-users@googlegroups.com
Cc: Twisted general discussion <twisted-python@twistedmatrix.com>
Sent: Sat, October 31, 2009 3:24:41 PM
Subject: Django + Twisted trunk, fresh virtualenv, simplest demo
Hi!
I was pulling my hair out yesterday, trying to get my Django
application's forms working on both the development server, and
running under Twisted trunk.
POST variables were not arriving in the REQUEST object where they
belonged, but only under Twisted.
So, I did the only logical thing; I made a completely isolated test
case, now available at:
https://github.com/ssteiner/twisted-django/
Along the way, I finally decided to start over from scratch with a
brand new --no-site-packages virtualenv, then installed only what was
absolutely required.
The repository shows what I think may be the simplest way to run
Django under Twisted WSGI which I pretty much stole wholesale from the
Pinax WSGI setup.
I'll be writing a blog post with a blow-by-blow shortly which I'll
post when it's done but, for now, this is a very clear, and dead
simple way to run Django under Twisted WSGI.
Please note: you *must* be running a Twisted trunk checkout because
some WSGI bugs have been fixed since the most recent release.
S
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
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
From: "ssteinerX@gmail.com" <ssteinerx@gmail.com>
To: django-users@googlegroups.com
Cc: Twisted general discussion <twisted-python@twistedmatrix.com>
Sent: Sat, October 31, 2009 3:24:41 PM
Subject: Django + Twisted trunk, fresh virtualenv, simplest demo
Hi!
I was pulling my hair out yesterday, trying to get my Django
application's forms working on both the development server, and
running under Twisted trunk.
POST variables were not arriving in the REQUEST object where they
belonged, but only under Twisted.
So, I did the only logical thing; I made a completely isolated test
case, now available at:
https://github.com/ssteiner/twisted-django/
Along the way, I finally decided to start over from scratch with a
brand new --no-site-packages virtualenv, then installed only what was
absolutely required.
The repository shows what I think may be the simplest way to run
Django under Twisted WSGI which I pretty much stole wholesale from the
Pinax WSGI setup.
I'll be writing a blog post with a blow-by-blow shortly which I'll
post when it's done but, for now, this is a very clear, and dead
simple way to run Django under Twisted WSGI.
Please note: you *must* be running a Twisted trunk checkout because
some WSGI bugs have been fixed since the most recent release.
S
--~--~---------~--~----~------------~-------~--~----~
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