Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>{% block title %}{% endblock %}</title>
- {% load staticfiles %}
- <!-- This area contains all my static files and cdns -->
- </head>
- <body>
- {% include 'inventory/snippets/nav.html' %}
- {% block content %}
- {% endblock content %}
- {% block body %}
- {% endblock body %}
- </body>
- </html>
- {% load filters %}
- {% load el_pagination_tags %}
- {% with invoices=invoice_list %}
- {% paginate invoices %}
- {% for invoice in invoices %}
- <!-- data stuffs -->
- <tr>
- <td></td>
- </tr>
- {% endfor %}
- {% show_more %}
- {% endwith %}
- {% extends "inventory/base.html" %}
- {% load staticfiles %}
- {% load filters %}
- {% load el_pagination_tags %}
- {% block title %}
- Cool Title
- {% endblock %}
- {% block content %}
- <div class="table-responsive-md">
- <table class="table table-hover table-sm table-bordered">
- <thead>
- <tr>
- <th></th>
- </tr>
- </thead>
- <tbody>
- {% include page_template %}
- {% block js %}
- {{ block.super }}
- <script src="https://code.jquery.com/jquery-latest.js"></script>
- <script src="{% static 'el-pagination/js/el-pagination.js' %}"></script>
- <script>$.endlessPaginate();</script>
- {% endblock %}
- </tbody>
- </table>
- </div>
- {% endblock %}
- def invoice_list_view(request,template='inventory/invoices.html',page_template='inventory/invoices_list.html'):
- context = {
- 'page_template': page_template,
- }
- if request.method == 'POST':
- if request.is_ajax():
- template = page_template
- # all_invoices is prefetched and what not, super fast.
- context['invoice_list'] = all_invoices
- return render(request, template, context)
Add Comment
Please, Sign In to add comment