Prevent lowercase conversions of IndexView column headers

pull/10465/head
viragjain30 2023-05-23 00:31:56 +05:30 zatwierdzone przez Sage Abdullah
rodzic bd38c91163
commit 9790cccd9c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
9 zmienionych plików z 15 dodań i 5 usunięć
wagtail
admin/views/generic
snippets/tests
test/testapp

Wyświetl plik

@ -11,6 +11,7 @@ Changelog
* Fix: Move comment notifications toggle to the comments side panel (Sage Abdullah)
* Fix: Remove comment button on InlinePanel fields (Sage Abdullah)
* Fix: Fix missing link to `UsageView` from `EditView` for snippets (Christer Jensen)
* Fix: Prevent lowercase conversions of IndexView column headers (Virag Jain)
* Docs: Document how to add non-ModelAdmin views to a `ModelAdminGroup` (Onno Timmerman)
* Docs: Document how to add StructBlock data to a StreamField (Ramon Wenger)
* Docs: Update ReadTheDocs settings to v2 to resolve urllib3 issue in linkcheck extension (Thibaud Colas)
@ -29,6 +30,7 @@ Changelog
* Fix: Move comment notifications toggle to the comments side panel (Sage Abdullah)
* Fix: Remove comment button on InlinePanel fields (Sage Abdullah)
* Fix: Fix missing link to `UsageView` from `EditView` for snippets (Christer Jensen)
* Fix: Prevent lowercase conversions of IndexView column headers (Virag Jain)
* Docs: Update documentation for `log_action` parameter on `RevisionMixin.save_revision` (Christer Jensen)
@ -178,8 +180,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)
@ -383,6 +386,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: 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.1.5 (02.05.2023)

Wyświetl plik

@ -710,6 +710,7 @@ Contributors
* fidoriel
* Ramon Wenger
* Christer Jensen
* Virag Jain
Translators
===========

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

@ -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

@ -21,6 +21,7 @@ depth: 1
* Move comment notifications toggle to the comments side panel (Sage Abdullah)
* Remove comment button on InlinePanel fields (Sage Abdullah)
* Fix missing link to `UsageView` from `EditView` for snippets (Christer Jensen)
* Prevent lowercase conversions of IndexView column headers (Virag Jain)
### Documentation

Wyświetl plik

@ -26,6 +26,7 @@ FieldPanels can now be marked as read-only with the `read_only=True` keyword arg
* Move comment notifications toggle to the comments side panel (Sage Abdullah)
* Remove comment button on InlinePanel fields (Sage Abdullah)
* Fix missing link to `UsageView` from `EditView` for snippets (Christer Jensen)
* Prevent lowercase conversions of IndexView column headers (Virag Jain)
### Documentation

Wyświetl plik

@ -10,6 +10,7 @@ from django.shortcuts import get_object_or_404, redirect
from django.urls import reverse
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy
from django.utils.text import capfirst
from django.views.generic import TemplateView
from django.views.generic.detail import BaseDetailView
from django.views.generic.edit import BaseCreateView
@ -299,7 +300,7 @@ class IndexView(
return column_class(
field_name,
label=label.title(),
label=capfirst(label),
sort_key=sort_key,
**kwargs,
)

Wyświetl plik

@ -652,8 +652,8 @@ class TestListViewWithCustomColumns(BaseSnippetViewSetTests):
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

@ -1135,7 +1135,7 @@ class FullFeaturedSnippet(
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 Meta(TranslatableMixin.Meta):
verbose_name = "full-featured snippet"