How do I specify the constructor docstring for a Django model?
Then I run pdoc Mymodel
in the python shell, I want the docstring for the constr开发者_如何学Gouctor of my django model. Where can I specify this ?
In the __init__
method.
class MyModel(models.Model)
def __init__(self, *args, **kwargs)
"""My docstring
"""
super(MyModel, self).__init__(*args, **kwargs)
精彩评论