I am getting the lines from the linux
log files and i am displaying in the bowser using django.
- They are all displaying as same paragarah but i want to show them with new lines
- They display in nelwines if i warp them in
<pre> lines </pre>
but then my html tags are not rendered properly
is there any way to display that in good format with newlines and html tag rendered properly
You can try to convert newlines to
<br />
tagsThere is a Django filter that can be useful https://docs.djangoproject.com/en/dev/ref/templates/builtins/#linebreaks
Try using
linebreaks
orlinebreakbr
filters. From django referenceFor example:
You can also use
linenumbers
You can use built-in template tags:
or