> I'm getting error messages with sorl thumbnail. [...] All works fine,
> until I use the following template thumbnail tag:
> 
> <img src="{% thumbnail '{{obj}}'  80x80 %}}" />

You must not put braces around variables passed to a template tag.

Just write: {% thumbnail obj 80x80 %}

That also explains why your {% thumbnail '/path/to/image' 80x80 %}
example works as expected. It's treated as string while {% thumbnail
/path/to/image 80x80 %} would cause a /path/to/image variable to be
searched inside the current template context which will probably not exist.

It highly depends on the template tag you're using. For example is the
80x80 not treated as a variable even though it's lacking quotation marks
around it.

For more information how template tags actually work check the docs:

http://docs.djangoproject.com/en/dev/howto/custom-template-tags/


--mp

--~--~---------~--~----~------------~-------~--~----~
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