You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a feature request: it would be possible to fetch the database comment not only from help_text and from verbose_name but also from the special __doc__ element attached to the column field? For instance, it would be great to do something like:
name = models.CharField(name='name', max_length=255, null=False)
"""
Name of the my awesome entity
"""
In this way we could fetch the help not only in the database, but also from the content assist (e.g., in PyCharm IDE) as well.
What do you think?
The text was updated successfully, but these errors were encountered:
I've checked __doc__ property on provided example:
ipdb> field
<django.db.models.fields.CharField: name>
ipdb> field.__doc__
ipdb>
But django doesn't store __doc__ as property of Field and library need to parse AST for it, and so autodiscover every models' source code. It's a bit overhead for processing, and I've decided not to implement the feature.
Description
This is a feature request: it would be possible to fetch the database comment not only from
help_text
and fromverbose_name
but also from the special__doc__
element attached to the column field? For instance, it would be great to do something like:In this way we could fetch the help not only in the database, but also from the content assist (e.g., in PyCharm IDE) as well.
What do you think?
The text was updated successfully, but these errors were encountered: