Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capitalize fields without verbose names in "additional columns"? #1028

Closed
koeaw opened this issue Jul 2, 2024 · 3 comments · Fixed by #1378 or #1411
Closed

Capitalize fields without verbose names in "additional columns"? #1028

koeaw opened this issue Jul 2, 2024 · 3 comments · Fixed by #1378 or #1411
Labels
UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface)

Comments

@koeaw
Copy link
Contributor

koeaw commented Jul 2, 2024

I noticed that fields without a verbose_name in the "additional columns" dropdown aren't capitalised whereas the field labels in the search/filter form on the left are (probably because that's the Django default).

For consistency, it would make sense to mimic the Django behaviour and capitalize them.

In this example, model fields: name, latitude, longitude:

@koeaw koeaw added the UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface) label Jul 2, 2024
@b1rger
Copy link
Contributor

b1rger commented Jul 2, 2024

Probably using django.forms.utils.pretty_name would make sense:

https://github.com/django/django/blob/aa74c4083e047473ac385753e047e075e8f04890/django/forms/utils.py#L13

@koeaw
Copy link
Contributor Author

koeaw commented Jul 3, 2024

Just saw this also affects the detail view:

Screenshot 2024-07-03 at 12-10-57 Wien

@koeaw
Copy link
Contributor Author

koeaw commented Jul 10, 2024

Probably using django.forms.utils.pretty_name would make sense:

https://github.com/django/django/blob/aa74c4083e047473ac385753e047e075e8f04890/django/forms/utils.py#L13

Yeah, looks like that's what's used internally for model fields without verbose_name & similar as well as form fields without label.

@koeaw koeaw removed their assignment Oct 14, 2024
b1rger added a commit that referenced this issue Nov 13, 2024
Make the column choices have the same format as the filter form labels
by running the field names through the `pretty_name` method.

Closes: #1028
@b1rger b1rger closed this as completed in 07951c4 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI-UX Appearance, coherence, usability of user-facing parts (frontend, user interface)
Projects
None yet
2 participants