8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Optimisation chargement des profils de ports

This commit is contained in:
Gabriel Detraz 2019-08-06 04:20:53 +02:00 committed by root
parent d8ad882eff
commit 99fd303143

View file

@ -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')