We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
help_text
1 parent 9a3c47a commit 01ac524Copy full SHA for 01ac524
src/pytkdocs/loader.py
@@ -741,11 +741,19 @@ def get_django_field_documentation(node: ObjectNode) -> Attribute:
741
if prop.blank:
742
properties.append("blank")
743
744
+ # set correct docstring based on verbose_name and help_text
745
+ # both should be converted to str type in case lazy translation
746
+ # is being used, which is common scenario in django
747
+ if prop.help_text:
748
+ docstring = f"{prop.verbose_name}: {prop.help_text}"
749
+ else:
750
+ docstring = str(prop.verbose_name)
751
+
752
return Attribute(
753
name=node.name,
754
path=path,
755
file_path=node.file_path,
- docstring=prop.verbose_name,
756
+ docstring=docstring,
757
attr_type=prop.__class__,
758
properties=properties,
759
)
0 commit comments