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
What are your thoughts on adding optional help_text to the FilterSet.
Here is an example of how we use it:
class AttributeFilter(FilterSet):
class Meta(object):
model = Attribute
fields = {
"id": ["exact", "in"],
"name": ["exact", "iexact", "icontains", "contains"],
}
help_text = {
"id": {
"exact": "id/primary key for an Attribute entry.",
"in": "Comma separated list of ids/primary keys for a set of Attribute entries.",
},
"name": {
"exact": "Attribute name field.",
"iexact": "Case insensitive search for attribute name field.",
"icontains": "Case insensitive `like` search for Attribute names.",
"contains": "Case sensitive `like` search for Attribute names.",
},
}
This is useful when auto-generating API documentation.
What are your thoughts on adding optional
help_text
to theFilterSet
.Here is an example of how we use it:
This is useful when auto-generating API documentation.
cc: @alfredoahds
Note: I should add that we would be willing to submit a PR if you would like to see this added.
The text was updated successfully, but these errors were encountered: