Hi all,
This is a really impressive solution. An extra idea:
adding a {% as variable_name %}{% endas %} or {% as variable %}{%
endas variable_name %}
Example:
{% blocktrans %}
Received on {{ message.created|date as date }}
from
{% as link_open %}<a href="{{ user.url }}" {% userlink user.id
%}>{% endas link_open }}
{{ user.name as username }}
(married since {{ user.married|year as married_since }})
{{ '<a/>' as link_close }}
{% endblocktrans %}
PROS:
* keep things clean if the tag code gets complicated, long or quotey.
* all the same benefits that """ provides in python
CON:
* adding unnecessary tags is a distraction
Cheers,
--
Will Hardy
m: +49 177 392 89 26
e: [EMAIL PROTECTED]
w: http://www.willhardy.com.au
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---