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

Feature request: value_foo equivalent for column headers #947

Open
danielroseman opened this issue Mar 20, 2024 · 2 comments
Open

Feature request: value_foo equivalent for column headers #947

danielroseman opened this issue Mar 20, 2024 · 2 comments

Comments

@danielroseman
Copy link
Contributor

danielroseman commented Mar 20, 2024

I recently used the export functionality with a table, and it worked perfectly except for one issue. Our column headers are highly customised, via defining verbose_name, to add popup explanations in HTML. Clearly that HTML is irrelevant in the export - but the only way I could see to remove it was to define an identical column without the custom header, mark it as invisible, and exclude the original column from the export.

It would be great if there was some equivalent of the values_foo method to make it possible to output the header without any customisation. Or possibly even a plain_verbose_name attribute that defaults to the value of verbose_name.

What do you think? Happy to contribute a PR if you think this would be useful.

@jieter
Copy link
Owner

jieter commented Jul 2, 2024

I understand the use case, but I'm not sure if supporting another customisation is worth it. If you can provide a reasonable patch, I'll have a serious look at it.

@5tefan
Copy link

5tefan commented Dec 19, 2024

@jieter could you take a look at #970 and let me know your thoughts? I am in a similar position with some gnarly html coming out in export headers and would love to have a nice declarative way to clean that up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants