diff --git a/django_lostplaces/lostplaces/views/place_views.py b/django_lostplaces/lostplaces/views/place_views.py index 3240e10..f367623 100644 --- a/django_lostplaces/lostplaces/views/place_views.py +++ b/django_lostplaces/lostplaces/views/place_views.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from django.db.models.functions import Lower + from django.views import View from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic.detail import SingleObjectMixin @@ -23,7 +25,7 @@ class PlaceListView(IsAuthenticatedMixin, ListView): paginate_by = 5 model = Place template_name = 'place/place_list.html' - ordering = ['name'] + ordering = [Lower('name')] def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs)