forked from DGNum/gestioCOF
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):
|
class DemandeListView(ListView):
|
||||||
model = PetitCoursDemande
|
queryset = (
|
||||||
|
PetitCoursDemande.objects
|
||||||
|
.prefetch_related('matieres')
|
||||||
|
.order_by('traitee', '-id')
|
||||||
|
)
|
||||||
template_name = "petits_cours_demandes_list.html"
|
template_name = "petits_cours_demandes_list.html"
|
||||||
paginate_by = 20
|
paginate_by = 20
|
||||||
|
|
||||||
def get_queryset(self):
|
|
||||||
return PetitCoursDemande.objects.order_by('traitee', '-id').all()
|
|
||||||
|
|
||||||
|
|
||||||
class DemandeDetailView(DetailView):
|
class DemandeDetailView(DetailView):
|
||||||
model = PetitCoursDemande
|
model = PetitCoursDemande
|
||||||
|
|
Loading…
Add table
Reference in a new issue