Compare commits

...

2 commits

Author SHA1 Message Date
j
1a3edf4f93 sort by document name 2018-02-15 15:57:12 +01:00
j
a73b9f5600 use functools directly 2018-02-15 15:57:03 +01:00
2 changed files with 3 additions and 5 deletions

View file

@ -174,7 +174,7 @@ class Entity(models.Model):
response[key] = self.name_sort
elif key == 'documents':
response[key] = [ox.toAZ(id_)
for id_, in self.documentproperties.order_by('index').values_list('document_id')]
for id_, in self.documentproperties.order_by('document__name_sort').values_list('document_id')]
elif key in self.data:
response[key] = self.data[key]
return response

View file

@ -2,10 +2,8 @@
# vi:si:et:sw=4:sts=4:ts=4
from __future__ import absolute_import
try:
from django.contrib.auth.decorators import wraps
except:
from django.utils.functional import wraps
from functools import wraps
from .shortcuts import render_to_json_response
def login_required_json(function=None):