summaryrefslogtreecommitdiff
path: root/ishtar_common/views_item.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/views_item.py')
-rw-r--r--ishtar_common/views_item.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py
index 846646d6b..3ed380465 100644
--- a/ishtar_common/views_item.py
+++ b/ishtar_common/views_item.py
@@ -1773,6 +1773,7 @@ def get_item(
alt_query_own=None,
search_form=None,
no_permission_check=False,
+ callback=None,
):
"""
Generic treatment of tables
@@ -1796,6 +1797,7 @@ def get_item(
:param model_for_perms: use another model to check permission
:param alt_query_own: name of alternate method to get query_own
:param search_form: associated search form to manage JSON query keys
+ :callback: callback to execute after request. It is called with three arguments: request, export format and queryset of the result
:return:
"""
@@ -2421,6 +2423,12 @@ def get_item(
start = 0
end = 20
+ if callback:
+ slice_query = None
+ if not manual_sort_key:
+ slice_query = (start, end)
+ callback(request, data_type, items, slice_query)
+
if manual_sort_key:
items = items.all()
else: