Hi all,

I recently had a weird problem in my django templates regarding evaluating
variables within a blocktrans, but I finally figured it out. I guess I just
want to know the reason why it worked, an explanation sort of.

THIS DID NOT WORK
{% blocktrans %}Approve all {{ objects.count }} users{% endblocktrans %}

HOWEVER, THIS WORKED
{% blocktrans with objects.count as objects_count%}Approve all {{
objects_count }} users{% endblocktrans %}

Can someone explain to me the reason behind why the last code statement
worked as opposed to the first one?

Thanks.

With Regards,
Frankline

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEAUGdX5it8Z3kLGKOspGZj%3DY%3DkstNeLHLvySGtogLXEOO58HQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to