在Django应用程序中激活admindocs后,在对象中添加以下注释:
"""
Maintains ABC Object definitions. Each ABC has one or more PQR.
See Also :model:`myapp.PQR` and :model:`myapp.XYZ`.
"""
在Django Admin Documentation中,它呈现为一行:
Maintains ABC Object definitions. Each ABC has one or more PQR. See Also: myapp.PQR and myapp.XYZ.
有没有办法在评论中应用换行符。我是python / django的新手。
看到How to preserve line breaks when generating python docs using sphinx但是添加一个垂直条(也有2个空格)不起作用。垂直条也成为单行的一部分:
Maintains ABC Object definitions. Each ABC has one or more PQR. | See Also: myapp.PQR and myapp.XYZ.