hi,
[version: django svn trunk]
I have a model with imagefield named 'photo'. I want to display the image if it
exists. My template code is:
{% if p.photo.url %}
<img src = "{{p.photo.url|thumbnail:" width=100"}}" width="100" />
but I get this error:
"Caught an exception while rendering: The 'photo' attribute has no file
associated with it"
obviously p.photo.url exists even if there is no file attached. How do I check
for this in a template.
--
regards
kg
http://lawgon.livejournal.com
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---