开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜