You can either:
{% load eztables %}
from django.template import add_to_builtins
add_to_builtins('eztables.templatetags.eztables')
A {% datatables_js %} tag is available to include the datatables javascript library. After loading, you can use the Datatables library as usual:
<table id="my-table">
</table>
{% datatables_js %}
<script>
$('#my-table').dataTable();
</script>
If you want to use the twitter bootstrap style (based on this blog post), 2 template tags are provided for:
- {% datatables_bootstrap_js %} for the javascript part.
- {% datatables_bootstrap_css %} for the css part.
<head>
{% datatables_bootstrap_css %}
{% datatables_js %}
{% datatables_bootstrap_js %}
</head>
<table id="my-table">
</table>
<script>
$('#my-table').dataTable({
"bPaginate": true,
"sPaginationType": "bootstrap",
"bScrollCollapse": true
});
</script>