diff options
Diffstat (limited to 'ishtar_common/views_item.py')
-rw-r--r-- | ishtar_common/views_item.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index 1b6d1e724..374dc3927 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -1120,8 +1120,15 @@ def get_item(model, func_name, default_name, extra_request_keys=[], for k in ks: if k.endswith("__pk"): k = k[:-len("__pk")] + "__label" - if '__' in k: - k = k.split('__')[0] + if k.endswith("towns"): + k = k + "__cached_label" + if k.endswith("__icontains") or \ + k.endswith("__contains") or \ + k.endswith("__iexact") or \ + k.endswith("__exact"): + k = '__'.join(k.split('__')[:-1]) + # if '__' in k: + # k = k.split('__')[0] orders.append(signe + k) else: # not a standard request key |