This is probably very simple. My database objects have a TextField. Now, when I add the contents of the TextFields to an html paragraph, there are no new lines. How can I make Django show those newlines? Thank you!
- possible duplicate of Django doesn't display newline character when rendering text from databaseParadox– Paradox2015-06-22 17:44:27 +00:00Commented Jun 22, 2015 at 17:44
- Wait, there seems to be a problem...Antoni4040– Antoni40402015-06-22 17:45:55 +00:00Commented Jun 22, 2015 at 17:45
- Never mind, minor detail...Antoni4040– Antoni40402015-06-22 17:48:31 +00:00Commented Jun 22, 2015 at 17:48
- Could you select an answer if @Daniel Roseman has solved your problem?Paradox– Paradox2015-06-22 17:49:32 +00:00Commented Jun 22, 2015 at 17:49
Add a comment |
1 Answer
Use the linebreaks template filter.
1 Comment
Antoni4040
That seems to do the trick, but suddenly, my text has lost all it's properties. Color, size etc. Weird...