python - Adding to, Not Overriding a Template Block -


i have block of code in django template simple blog engine:

    {% block mainleft %}     <section class="container" id="main">         <section class="offset1 span8" id="mainleft">         </section>     {% endblock %} 

what correct way add content within #mainleft section different templates be? instance, if wanted dynamically generate divs within section tag based on info passed in context.

use {{ block.super }} in block. see docs.


Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -