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