Is there a way to put a newline in the label of a form field in Django? Putting a \\n just results in a newline in the HTML, and trying just
\\n
You can also do this directly in the template as follows:
{{my_field.label|linebreaks}}
\n will convert to that way
\n
As per the doc,
a single newline becomes an HTML line break () and a new line followed by a blank line becomes a paragraph break ().
a single newline becomes an HTML line break () and a new line followed by a blank line becomes a paragraph break (