kopia lustrzana https://github.com/wagtail/wagtail
Prevent lowercase conversions of IndexView column headers
rodzic
5e12ee4411
commit
a1cc0969a9
wagtail
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -689,6 +689,7 @@ Contributors
|
|||
* Deepam Priyadarshi
|
||||
* Babitha Kumari
|
||||
* Christer Jensen
|
||||
* Virag Jain
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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):
|
||||
|
|
Ładowanie…
Reference in New Issue