Tri des chants indépendant de la casse
This commit is contained in:
parent
daca903aba
commit
ab05d3a7fe
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ from datetime import date, timedelta
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
|
||||||
|
from django.db.models.functions import Lower
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
from django.views.generic import (
|
from django.views.generic import (
|
||||||
|
|
@ -134,7 +135,7 @@ class ListeChantsView(LoginRequiredMixin, ListView):
|
||||||
template_name = "membres/liste_chants.html"
|
template_name = "membres/liste_chants.html"
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return super().get_queryset().prefetch_related("chantdoc_set").order_by("titre")
|
return super().get_queryset().prefetch_related("chantdoc_set").order_by(Lower("titre"))
|
||||||
|
|
||||||
|
|
||||||
class ChantAddView(PermissionRequiredMixin, CreateView):
|
class ChantAddView(PermissionRequiredMixin, CreateView):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue