mkdocstrings / pytkdocs

Load Python objects documentation.
https://mkdocstrings.github.io/pytkdocs
ISC License
50 stars 32 forks source link

Add support for help_text field parameter as description with django model fields. #127

Closed mabugaj closed 2 years ago

mabugaj commented 2 years ago

Is your feature request related to a problem? Please describe. Now django support uses only verbose_name for field description. It would be great to take advantage of help_text parameter which seems to be the best place to place long description about what exactly given field does.

According to the docs help_text is the place where we should place documentation about the field (docs) rather than verbose_name which is actually only longer name for the field.

Describe the solution you'd like Concat verbose_name with help_text when help_text is specified. Maybe like so:

f"{field.verbose_name} - {field.help_text}"

Describe alternatives you've considered As the verbose_name should be concise I'm using doctsring with Attributes which is copy paste from fields and a lot of manual work which is unneeded.

Additional context This is directly related to #39