mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-09-12 01:03:09 +00:00
Optimisation chargement des profils de ports
This commit is contained in:
parent
d8ad882eff
commit
99fd303143
1 changed files with 4 additions and 2 deletions
|
@ -165,8 +165,10 @@ def index(request):
|
|||
@can_view_all(PortProfile)
|
||||
def index_port_profile(request):
|
||||
pagination_number = GeneralOption.get_cached_value('pagination_number')
|
||||
port_profile_list = PortProfile.objects.all().select_related(
|
||||
'vlan_untagged')
|
||||
port_profile_list = PortProfile.objects.all()\
|
||||
.select_related('vlan_untagged')\
|
||||
.select_related('on_dormitory')\
|
||||
.prefetch_related('vlan_tagged')
|
||||
port_profile_list = re2o_paginator(
|
||||
request, port_profile_list, pagination_number)
|
||||
vlan_list = Vlan.objects.all().order_by('vlan_id')
|
||||
|
|
Loading…
Reference in a new issue