mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-09-12 01:03:09 +00:00
Optimisation chargement de la page gestion droits
This commit is contained in:
parent
58605ae3ff
commit
8015b27baa
2 changed files with 3 additions and 2 deletions
|
@ -441,7 +441,7 @@ class ListRightForm(ModelForm):
|
|||
"""Edition, d'un groupe , équivalent à un droit
|
||||
Ne peremet pas d'editer le gid, car il sert de primary key"""
|
||||
permissions = forms.ModelMultipleChoiceField(
|
||||
Permission.objects.all(),
|
||||
Permission.objects.all().select_related('content_type'),
|
||||
widget=forms.CheckboxSelectMultiple,
|
||||
required=False
|
||||
)
|
||||
|
|
|
@ -710,7 +710,8 @@ def index_school(request):
|
|||
@can_view_all(ListRight)
|
||||
def index_listright(request):
|
||||
""" Affiche l'ensemble des droits , need droit cableur """
|
||||
listright_list = ListRight.objects.order_by('unix_name')
|
||||
listright_list = ListRight.objects.order_by('unix_name')\
|
||||
.prefetch_related('permissions').prefetch_related('user_set')
|
||||
return render(
|
||||
request,
|
||||
'users/index_listright.html',
|
||||
|
|
Loading…
Reference in a new issue