2

After activating admindocs in Django app, the following comment is added in an object:

"""
Maintains ABC Object definitions. Each ABC has one or more PQR. 
See Also :model:`myapp.PQR` and :model:`myapp.XYZ`.
"""

In Django Admin Documentation, it is rendered as a single line:

Maintains ABC Object definitions. Each ABC has one or more PQR. See Also: myapp.PQR and myapp.XYZ.

Is there a way to apply line breaks in comments. I'm new to python/ django.

Saw How to preserve line breaks when generating python docs using sphinx but adding a Vertical bar ( with 2 empty spaces as well) did not work. Vertical bar also became part of the single line:

Maintains ABC Object definitions. Each ABC has one or more PQR. | See Also: myapp.PQR and myapp.XYZ.
Ajay
  • 344
  • 3
  • 15
  • 1
    Possible duplicate of [How to preserve line breaks when generating python docs using sphinx](https://stackoverflow.com/questions/7033239/how-to-preserve-line-breaks-when-generating-python-docs-using-sphinx) – Satendra Nov 22 '17 at 07:14
  • Vertical bar did not work. – Ajay Nov 22 '17 at 07:39
  • 1
    I would just add an empty line between the lines, and not worry about it being paragraphs instead of lines with breaks. In a sense, this is better anyway: line breaks are great for code, but not really meant for text. –  Nov 22 '17 at 07:45
  • Empty Line worked! Thanks @Evert – Ajay Nov 22 '17 at 07:58

0 Answers0