﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1298	allow customized sort in model.get_list() and META ordering	mattimustang@…	Adrian Holovaty	"I would like to be able to sort a field by more than just its alpha or numerical ascending/descending order:

eg. With the model:

{{{
class A(meta.Model):
    ip = meta.IPAddressField()
    class META: ordering = ['ip']
}}}

The list of IP's gets sorted like this:

{{{
192.168.1.1
192.168.1.10
192.168.1.11
192.168.1.2
192.168.1.20
}}}

rather than how I would like to have it sorted:

{{{
192.168.1.1
192.168.1.2
192.168.1.10
192.168.1.11
192.168.1.20
}}}

Is it possible to add a {{{ model.get_list(order_by=('ip', sort_ip_function)) }}} or as well as some equivalent in META like 'ordering = (('ip', sort_ip_function),)' option to allow some kind of customized sorting to happen?

thanks

matthew

ps. Do Managers in magic-removal address this?"	enhancement	closed	Core (Other)		normal	invalid			Unreviewed	0	0	0	0	0	0
