Django has a different template inheritance pattern (http://docs.djangoproject.com/en/1.2/topics/templates/#template-inheritance) which encourages the use of multiple blocks that can be overriden by a child template.
You can should achieve a similiar behaviour in this way:
<!-- layout.html -->
<html>
<head>
{{ def block(): }}
<p>This is the layout's block!</p>
{{ pass }}
{{ include }}
</head>
<body>
{{ block() }}
</body>
</html>
<!-- hello.html -->
{{ extend 'layout.html' }}
{{ def block(): }}
<p>Hello there block users!</p>
{{ pass }}
Comments (1)
0
thadeusb 14 years ago