16 results
tagged
templating
htpy is a library that makes writing HTML in plain Python fun and efficient, without a template language.
Tempest jQuery Templating Plugin
Will probably use Jinja2 for my next Django project. Had it in mind for too long. Need to check it out.
This is a customized version of the default for template tag which takes an optional {% else %} clause that will be displayed if the given array is empty.
from django.template import *
t1 = Template("""
{% load mytags %}
{% for athlete in athlete_list %}
{{ athlete }}
{% else %}
No athlete in list!
{% endfor %}
""")
c1 = Context(
{'athlete_list':
['me ...