Skip to content
Snippets Groups Projects
Commit 0339e792 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

added configurable 'multi_change_limit' setting

parent c4c8f78c
No related branches found
No related tags found
3 merge requests!143Query Page:,!115Master,!114added configurable 'multi_change_limit' setting
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
{% include 'taskdatabase/pagination.html' %} {% include 'taskdatabase/pagination.html' %}
</div> </div>
</div> </div>
<p class="footer"> Version 1.0.0 (13 apr 2021 - 17:35) <p class="footer"> Version 1.0.0 (16 apr 2021 - 17:30)
</div> </div>
......
...@@ -130,9 +130,12 @@ class QueryView(SingleTableMixin, FilterView): ...@@ -130,9 +130,12 @@ class QueryView(SingleTableMixin, FilterView):
count = self.object_list.count() count = self.object_list.count()
# get list of id's try:
LIMIT = settings.QUERY_LIMIT_MULTI_CHANGE limit = int(Configuration.objects.get(key='multi_change_limit').value)
query_list_of_ids = list(self.object_list.values_list('id'))[:LIMIT] except:
limit = settings.QUERY_LIMIT_MULTI_CHANGE
query_list_of_ids = list(self.object_list.values_list('id'))[:limit]
# store on the session # store on the session
self.request.session['query_list_of_ids'] = query_list_of_ids self.request.session['query_list_of_ids'] = query_list_of_ids
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment