On Fri, 2006-07-07 at 13:43 +0000, ama55 wrote:
> Hi everyone:
> i have a person module i am able to upload an image related to the
> person
> this is in mmy module file
> image = models.ImageField(upload_to =
> 'training/admin/templates/pictures').
> it is saving the image in the folder.
> the problem is that when i am not able to display the image on my page
> but i am not able to do so.
> in my view.html i am using the following:
> <img src = "{{person.image}}"/>
> but no picture is displayed.
You want to do something like
<img src="{{ person.get_image_url }}">
See http://www.djangoproject.com/documentation/model_api/#filefield for
documentation about this (it works for ImageFields as well as
FileFields).
Regards,
Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---