Closed afparsons closed 1 year ago
This bothered me as well, I solved it in the following way:
field_verbose_name[:1].upper() + field_verbose_name[1:]
Since this project is not maintained anymore, I packaged my own fork: https://pypi.org/project/sphinxcontrib-django2/
If you have any ideas for improvements, feel free to submit them to the forked repo: sphinxcontrib-django2
Thanks, @timoludwig. I saw your "Maintained Fork" issue. While it is unfortunate that @vdboor has seemingly abandoned maintence, I'm glad you've stepped up and are willing to maintain a fork. Hopefully your fork gets more traction.
I now merged the changes of my fork back into this repo, including commit 714230958150f0c9bbd75a55cdea6204c6bd3a31 which fixes this issue.
In the following block in
docstrings.py
,.capitalize()
is applied to theverbose_name
.This is not behavior I expect as a user.
For example, I have a model and field:
I have explicitly set my preferred case (notably, all uppercase letters for the "API" abbreviation), but because
.capitalize()
is applied toverbose_name
, this is turned into:Solution proposals:
.capitalize()
entirely (and update test cases).capitalize()