开发者

How do I specify the constructor docstring for a Django model?

开发者 https://www.devze.com 2023-03-17 14:16 出处:网络
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.

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

精彩评论

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