{ "info": { "author": "Thiago Carvalho D Avila", "author_email": "thiagocavila@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "|Travis|_ |Python27|_ |PyPi|_\n\n.. |Travis| image:: https://api.travis-ci.org/staticdev/django-sorting-bootstrap.svg?branch=master\n.. _Travis: https://travis-ci.org/staticdev/django-sorting-bootstrap\n\n.. |Python27| image:: https://img.shields.io/badge/python-2.7-blue.svg\n.. _Python27: https://badge.fury.io/py/django-sorting-bootstrap\n\n.. |PyPi| image:: https://badge.fury.io/py/django-sorting-bootstrap.svg\n.. _PyPi: https://badge.fury.io/py/django-sorting-bootstrap\n\n\ndjango-sorting-bootstrap\n========================\n\nDjango-sorting-bootstrap is a pluggable mini-API to easy add sorting for querysets, links and table headers in Django_ templates. There is also a new tag that creates headers for sorting tables using `Bootstrap`_'s layout.\n\nInstallation\n------------\nTo install ``django-sorting-bootstrap`` simply run::\n\n pip install django-sorting-bootstrap\n\nConfiguration\n-------------\n\nInclude `sorting_bootstrap` in your `INSTALLED_APPS`\n\nPut `{% load sorting_tags %}` at top of your templates.\n\nYour templates have four tags available:\n\n`auto_sort`\n`sort_link`\n`sort_th`\n`sort_headers`\n\nBasic usage::\n\n {% auto_sort queryset %}\n {% sort_link \"link text\" \"field_name\" %}\n {% sort_th \"link text\" \"field_name\" %}\n {% sort_headers simpleschangelist %}\n \n\nauto_sort\n-------------------\nIt sorts the queryset in place and replaces the queryset by the sorted queryset.\n\nThis needs to be called prior to a slice has been taken from a queryset.\n(Ordering can not be done after the slice has been taken.) In particular this will\nnot work with generuc view `object_list`.\n\nBasic usage::\n\n {% auto_sort queryset %}\n\n\nsort_link\n-----------------\nSort link outputs a link which will sort on the given field. The field to sort on should be\na database field, or something which `.order_by` of queryset would work.\n\nBasic usage::\n\n {% sort_link \"link text\" \"field_name\" %}\n\nExample usage::\n \n {% sort_link \"Name\" \"name\" %}\n \nIt may also be used as::\n \n {% sort_link \"link text\" \"field_name\" \"vis_name\" %}\n {% sort_link \"Name\" \"name\" \"what\" %}\n \nThis is useful if you do not wnat to expose your database fields in urls.\n\n\nsort_th\n-------------------\nIt works the same way as sort_link, but the difference is the output template that renders a table header tag