mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-27 07:02:26 +00:00
Optimisation chargement des modules switchs
This commit is contained in:
parent
99fd303143
commit
5034c2656c
1 changed files with 2 additions and 1 deletions
|
@ -339,7 +339,8 @@ def index_model_switch(request):
|
|||
def index_module(request):
|
||||
"""Display all modules of switchs"""
|
||||
module_list = ModuleSwitch.objects.all()
|
||||
modular_switchs = Switch.objects.filter(model__is_modular=True)
|
||||
modular_switchs = Switch.objects.filter(model__is_modular=True)\
|
||||
.select_related('model').prefetch_related('moduleonswitch_set__module')
|
||||
pagination_number = GeneralOption.get_cached_value('pagination_number')
|
||||
module_list = re2o_paginator(request, module_list, pagination_number)
|
||||
return render(
|
||||
|
|
Loading…
Reference in a new issue