Django: How can I get a block from a template?

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-04-21T23:09:46Z Indexed on 2010/04/21 23:13 UTC
Read the original article Hit count: 182

Filed under:
|
|

Suppose my template has in it something like {% block subject %}my subject{% endblock %} and I load this template with tmpl = loader.get_template('mytemplate.html'), how can I extract "my subject"?

© Stack Overflow or respective owner

Related posts about django

Related posts about django-templates