- Install using pip
$ pip install django-chunks2
- Add the
chunks
application toINSTALLED_APPS
in your settings file (usuallysettings.py
) - Sync database (
./manage.py syncdb
or./manage.py migrate
) - Use chunks on your templates
{% load chunks %}
<html>
<head>
<title>Test</title>
</head>
<body>
<h1>Blah blah blah</h1>
<div id="sidebar">
...
</div>
<div id="left">
{% chunk "home_page_left" %}
</div>
<div id="right">
{% chunk "home_page_right" %}
</div>
</body>
</html>