Hi,

I have a two model classes, Article and Image, and with ModelForm and
inline_formset I've created a form for editing an article and the images
that belong to it. If the article has two attached images the inline_formset
will create two "file inputs" for the attached images and three "file
inputs" for new images to be attached. What I would like to do is to display
the images that are already attached (for improved usability).

In the template {{form.id}} will produce something like this: '<input
type="hidden" name="image_set-1-id" value="3" id="id_image_set-1-id" />' for
the images that are already attached/uploaded. If I've understood things
correctly 'value="3"' means that the uploaded image/file has the id 3 in the
database. Is this correct? And if this is correct can I access that value in
the template somehow so that I can display the image and not only the "file
input" and delete checkbox?

If I've misunderstood this completely (or if I'm going down the wrong track)
how do one go about and show the filename/image of an already uploaded
file/image when using modelform and formsets?

I hope that I'm able to communicate my question clearly, I feel that I'm
having some troubles putting this into words (the fact that English isn't my
primary language doesn't help). If I'm unclear please don't hesitate to ask
for clarification.

-- 
Stefan Nitsche
ste...@nitsche.se

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

Reply via email to