Did you try entity.photo.url ? Assuming that entity is a model and photo is
a fileobject like field.
On Friday, April 5, 2013 8:20:11 PM UTC+2, knowledge_seeker wrote:
>
> I am trying to learn to use easy-thumbnails, which is necessary for
> Userena. Now, in the easy-thumbnails 'ReadMe' file it shows:
>
> {% load thumbnail %}
> <img src="{{ profile.photo|thumbnail_url:'avatar' }}" alt="" />
>
> But...when I am loading an underlying photo, I also have to use my
> 'media-url', like this:
>
> {% if entity.photo %} -->
> <img src="{{ MEDIA_URL }}{{ entity.photo }}" alt="{{ entity.name }}" />
> {% endif %}
>
> Well and good.. only, if I try to combine them, I get a sort of blank
> thumbnail:
>
> <img src=" {{ MEDIA_URL }}{{ entity.photo|thumbnail_url:'avatar' }}"
> alt="" />
>
> that is hte souce code indicates that the media -url is the entire address
> of the image; presumably because the entity.photo is being piped into
> easy-thumbnail without any base; any one else had this problem?
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.