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

assuming title case is good for headers is too bold #187

Merged
merged 1 commit into from
Mar 7, 2014

Conversation

mbertheau
Copy link
Contributor

Currently the verbose_name of columns is converted to title case. This makes sense if the verbose_name is taken from the python attribute name, but when it was specified explicitly it should be left alone.

This can be worked around by using mark_safe, however if the verbose name comes from a translation, we cannot safely assume that it doesn't contain malicious code.

If you agree I will prepare a PR to this effect.

@bradleyayers
Copy link
Collaborator

I do agree, in hindsight it was definitely a misstep when you consider stuff like translations that have different capitalisation rules…

Were you thinking of making this backwards incompatible? If so remember to bump the major version. This library should start using semantic versioning.

@mbertheau
Copy link
Contributor Author

@bradleyayers I left the version number alone because I don't know what else you might include in a release. If you do release a new version, which would be very helpful because then https://github.com/tangentlabs/django-oscar can depend on the new version, please consider including #183 as well.

@bradleyayers
Copy link
Collaborator

Should any changes to the docs be made to document the new behaviour?

bradleyayers added a commit that referenced this pull request Mar 7, 2014
assuming title case is good for headers is too bold
@bradleyayers bradleyayers merged commit bc9da04 into jieter:master Mar 7, 2014
@mbertheau mbertheau deleted the dont-titlise branch March 19, 2014 13:02
@tuttle
Copy link

tuttle commented May 28, 2014

If this merge is going to disable the titling of column headers, then I'm looking forward the next release allowing me to remove my monkey patch:

# Replace the Column.header property by monkey-patching. We want capitalize() instead of title().
orig_Column_header = columns.Column.header
columns.Column.header = property(lambda self: orig_Column_header.__get__(self).capitalize())

:-)

@mbertheau
Copy link
Contributor Author

@bradleyayers Do you plan to do a release that includes this fix anytime soon? That'd be great since then http://github.com/tangentlabs/django-oscar can depend on it.

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

Successfully merging this pull request may close these issues.

3 participants