Kaynağa Gözat

modificato ordine di visualizzazione utenti

mauro 1 yıl önce
ebeveyn
işleme
9c9cd2d298
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      utente/views.py

+ 1 - 1
utente/views.py

@@ -37,7 +37,7 @@ def welcome(request):
   #data['admin'] = User.objects.get(pk=data['AdminId']) che non so a che cazzo serve
 
   data['azienda'] = Azienda.objects.get(pk=data['AziendaId'])
-  data['utenti'] = data['azienda'].utente_set.all()
+  data['utenti'] = data['azienda'].utente_set.all().order_by('nome')
 
   if request.method == 'POST':
     print('qualcuno ha premuto un tasto')