Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

This library is aimed to simplify creation of user sorted lists.

Project Description


This library is aimed to simplify creation of user sorted lists.
Inspired by


1. Install with pip or

2. Add ordered_listview into `INSTALLED_APPS`. ::

INSTALLED_APPS += ['ordered__listview']

3. Add template tags lib into builtins. ::

add_to_builtins('ordered_listview.templatetags.ordered_listview') // Or load with {% load ordered_listview %}

4. Inherit your view from `OrderedListView`. And setup your ordering fields. ::

from ordered_listview import OrderedListView

class UserListView(OrderedListView):
allowed_order_by = [
('username', _('Login')),
('userfile__file__size', _('Size')),
('date_joined', _('Sing up date'))
default_order_by = 'created'

5. Add a tag into you your template. ::

{% include "ordered_listview/fields.html" %}


1. To change get attribute name, just set `OrderedListView.order_by` attribute ::

class UserListView(OrderedListView):
order_by = "order_by"

2. If you need to provide your own template create inside your `templates`
`ordered_listview` directory with `fields.html` and `field.html` in.

fields.html - list of sortable fields
field.html - order field and state template

3. If you want to ignore null values during sort, add fields to null_ignore_fields.

class UserListView(OrderedListView):
null_ignore_fields = ['quantity']

class UserListView(OrderedListView):
null_ignore_fields = '*' # For all fields

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(2.3 kB) Copy SHA256 Hash SHA256
Source None Nov 22, 2013

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers