R
R
reqww2020-12-13 03:05:12
Django
reqww, 2020-12-13 03:05:12

Line break in Django HTML email?

How to wrap a line in python so that it is also wrapped in the template?
\n - does not work
< br >< br > - too
(Spaces are specially made, otherwise it just turns out to be a line break)
Thanks for the help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2020-12-13
@reqww

Where do you need to break the line, in html? If yes, then of course \n will not work there. You need to use br, though I don’t know why it doesn’t work for you (it’s hard to say without an example).

The br tag sets a newline at the location where this tag is located. Unlike the p paragraph tag , using the br tag does not add an empty indent before the line. If text that uses a newline wraps around a floating element, you can use the clear attribute on the br tag to force the next line to start below the element.

Tag <br>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question