-
Notifications
You must be signed in to change notification settings - Fork 429
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
Titlise column verbose_name when derived from model #382
Conversation
Any verbose_name that was not passed explicitly in the column | ||
definition is returned titlised in keeping with the Django convention | ||
of verbose_names being defined in lowercase and uppercased/titlised | ||
as needed by the application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add backticks around variable/property names here? i.e.: verbose_names -> verbose_name
s
Apart from some line comments I added, it looks really good, thanks! Will merge after you work on those. |
I updated the docstring with backticks per your note, and tried to simplify the booleancolumn but it failed a test with my change. See the linenote for details. Let me know if I can do anything else here. |
I'll merge when you revert the |
Sorry about that, I thought I fixed that in a commit --amend after I caught the test failure. Reverted. |
Merged, thanks! |
This is my attempt at #249 and #368. If the verbose_name of a model is used to generate the verbose_name of the column, it is titlised. If the verbose_name is passed directly from a Column, it is used verbatim (see the test_column_verbose_name "override" tests). I updated the existing tests to reflect this change and added a couple new tests as well. If there's anything that I overlooked or need to change for this to be acceptable please let me know.