sort
This commit is contained in:
parent
eefd1e96e7
commit
a57be2614c
1 changed files with 4 additions and 1 deletions
|
@ -413,16 +413,19 @@ def order_query(qs, sort):
|
||||||
if operator != '-':
|
if operator != '-':
|
||||||
operator = ''
|
operator = ''
|
||||||
key = {
|
key = {
|
||||||
|
'browser': 'browser',
|
||||||
'email': 'user__email',
|
'email': 'user__email',
|
||||||
'firstseen': 'firstseen',
|
'firstseen': 'firstseen',
|
||||||
'ip': 'ip',
|
'ip': 'ip',
|
||||||
'lastseen': 'lastseen',
|
'lastseen': 'lastseen',
|
||||||
|
'level': 'level',
|
||||||
|
'location': 'location',
|
||||||
'screensize': 'screensize',
|
'screensize': 'screensize',
|
||||||
|
'system': 'system',
|
||||||
'timesseen': 'timesseen',
|
'timesseen': 'timesseen',
|
||||||
'useragent': 'useragent',
|
'useragent': 'useragent',
|
||||||
'username': 'username',
|
'username': 'username',
|
||||||
'windowsize': 'windowsize',
|
'windowsize': 'windowsize',
|
||||||
'level': 'level',
|
|
||||||
}.get(e['key'], 'user__profile__%s'%e['key'])
|
}.get(e['key'], 'user__profile__%s'%e['key'])
|
||||||
if key == 'user__profile__numberoflists':
|
if key == 'user__profile__numberoflists':
|
||||||
qs = qs.annotate(numberoflists=Sum('user__lists'))
|
qs = qs.annotate(numberoflists=Sum('user__lists'))
|
||||||
|
|
Loading…
Reference in a new issue