Prevent lowercase conversions of IndexView column headers

stable/4.2.x
viragjain30 2023-05-23 00:31:56 +05:30 zatwierdzone przez Sage Abdullah
rodzic 5e12ee4411
commit a1cc0969a9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
7 zmienionych plików z 11 dodań i 5 usunięć
docs/releases
wagtail
admin/views/generic
snippets/tests
test/snippets

Wyświetl plik

@ -6,8 +6,9 @@ Changelog
* Fix: Rectify previous fix for TableBlock becoming uneditable after save (Sage Abdullah)
* Fix: Ensure that copying page correctly picks up the latest revision (Matt Westcott)
* Docs: Update documentation for `log_action` parameter on `RevisionMixin.save_revision` (Christer Jensen)
* Fix: Adjust collection field alignment in multi-upload forms (LB (Ben) Johnston)
* Fix: Prevent lowercase conversions of IndexView column headers (Virag Jain)
* Docs: Update documentation for `log_action` parameter on `RevisionMixin.save_revision` (Christer Jensen)
4.2.3 (02.05.2023)
@ -206,6 +207,7 @@ Changelog
* Fix: Rectify previous fix for TableBlock becoming uneditable after save (Sage Abdullah)
* Fix: Ensure that copying page correctly picks up the latest revision (Matt Westcott)
* Fix: Prevent lowercase conversions of IndexView column headers (Virag Jain)
* Docs: Update documentation for `log_action` parameter on `RevisionMixin.save_revision` (Christer Jensen)

Wyświetl plik

@ -689,6 +689,7 @@ Contributors
* Deepam Priyadarshi
* Babitha Kumari
* Christer Jensen
* Virag Jain
Translators
===========

Wyświetl plik

@ -15,6 +15,7 @@ depth: 1
* Rectify previous fix for TableBlock becoming uneditable after save (Sage Abdullah)
* Ensure that copying page correctly picks up the latest revision (Matt Westcott)
* Prevent lowercase conversions of IndexView column headers (Virag Jain)
### Documentation

Wyświetl plik

@ -16,6 +16,7 @@ depth: 1
* Rectify previous fix for TableBlock becoming uneditable after save (Sage Abdullah)
* Ensure that copying page correctly picks up the latest revision (Matt Westcott)
* Adjust collection field alignment in multi-upload forms (LB (Ben) Johnston)
* Prevent lowercase conversions of IndexView column headers (Virag Jain)
### Documentation

Wyświetl plik

@ -8,6 +8,7 @@ from django.forms import Form
from django.http import Http404, HttpResponseRedirect
from django.shortcuts import get_object_or_404, redirect
from django.urls import reverse
from django.utils.text import capfirst
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
from django.views.generic import TemplateView
@ -270,7 +271,7 @@ class IndexView(
return column_class(
field_name,
label=label.title(),
label=capfirst(label),
sort_key=sort_key,
**kwargs,
)

Wyświetl plik

@ -646,8 +646,8 @@ class TestListViewWithCustomColumns(TestCase, WagtailTestUtils):
def test_custom_columns(self):
response = self.get()
self.assertContains(response, "Text")
self.assertContains(response, "Country Code")
self.assertContains(response, "Custom Foo Column")
self.assertContains(response, "Country code")
self.assertContains(response, "Custom FOO column")
self.assertContains(response, "Updated")
self.assertContains(response, "Foo UK")

Wyświetl plik

@ -86,7 +86,7 @@ class FilterableSnippet(index.Indexed, models.Model):
return f"Foo {self.country_code}"
get_foo_country_code.admin_order_field = "country_code"
get_foo_country_code.short_description = "Custom foo column"
get_foo_country_code.short_description = "custom FOO column"
class FilterableSnippetFilterSet(WagtailFilterSet):