1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
{% load static %}
{% load django_tables2 %}
{% load bootstrap3 %}
<!doctype html>
<html>
<head>
<title>django_tables2 with bootstrap 3 template example</title>
{% bootstrap_css %}
<link href="{% static 'django_tables2/bootstrap.css' %}" rel="stylesheet" />
</head>
<body>
<div class="container">
{% block body %}
<a href="https://getbootstrap.com/docs/3.3/css/#tables">Bootstrap 3 - table docs</a> |
<a href="https://getbootstrap.com/docs/3.3/components/#pagination">Bootstrap 3 - pagination docs</a> <br />
<h3>{% block title %}django_tables2 with <a href="https://getbootstrap.com/docs/3.3">Bootstrap 3</a> template example{% endblock %}</h3>
<div class="row">
<div class="col-sm-10">
<div class="pull-right">
{% if view.export_formats %}
{% for format in view.export_formats %}
<a href="{% export_url format %}" class="btn btn-xs btn-default">
download <code>.{{ format }}</code>
</a>
{% endfor %}
{% endif %}
</div>
{% if filter %}
<form action="" method="get" class="form form-inline">
{% bootstrap_form filter.form layout='inline' %}
{% bootstrap_button 'filter' %}
</form>
{% endif %}
</div>
<div class="col-sm-10">
{% render_table table %}
</div>
</div>
{% endblock %}
</div>
</body>
</html>
|