¡Esta es una revisión vieja del documento!
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['templates/'], ...
import django.template.loader as loader temp = loader.get_template('base.html') return HttpResponse(temp.render())
Puedes añadir una template al directorio templates de la APP. Entonces símplemente has de hacer loader.get_template('the_concrete.html').
{% for work in "xxx" %}
{% endfor %}
Add a template in openawards/reusable/worklist.html:
<div>hola</div>
Then in another:
{% for work in "xxx" %}
{% include 'openawards/reusable/worklist.html' %}
{% endfor %}
You even can send parameters:
{% include 'worklist.html' with var_a='abc' var_b=123 %}