On Thursday 28 May 2009 06:52:34 Kenneth Gonsalves wrote:
> [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" />

I am a moron - it should be:
 {% if p.photo %}
-- 
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 django-users@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