Fewer requests on petit cours list management.
This commit is contained in:
parent
8870b5ace2
commit
3dc91e30bd
1 changed files with 5 additions and 4 deletions
|
@ -24,13 +24,14 @@ from gestioncof.shared import lock_table, unlock_tables
|
|||
|
||||
|
||||
class DemandeListView(ListView):
|
||||
model = PetitCoursDemande
|
||||
queryset = (
|
||||
PetitCoursDemande.objects
|
||||
.prefetch_related('matieres')
|
||||
.order_by('traitee', '-id')
|
||||
)
|
||||
template_name = "petits_cours_demandes_list.html"
|
||||
paginate_by = 20
|
||||
|
||||
def get_queryset(self):
|
||||
return PetitCoursDemande.objects.order_by('traitee', '-id').all()
|
||||
|
||||
|
||||
class DemandeDetailView(DetailView):
|
||||
model = PetitCoursDemande
|
||||
|
|
Loading…
Reference in a new issue