Hello,

Write your own filter where you replace all \n with <br>. Then you habe an
idea why it would'nt work.

Regards

___Maxim.Nesterov___ <maxgoonfut...@gmail.com> schrieb am Sa., 8. Jan.
2022, 10:58:

> i tried but didn't work
>
> On Saturday, January 8, 2022 at 4:50:00 AM UTC+3 juw...@gmail.com wrote:
>
>> Try `linebreaks` instead of `linebreaksbr`.
>>
>> On Fri, 7 Jan 2022 at 21:52, ___Maxim.Nesterov___ <maxgoo...@gmail.com>
>> wrote:
>>
>>> Hi, why linebreaksbr might not work {{somevalue | linebreaksbr}}
>>>
>>> For example, somevalue = ‘Joel\nis a slug’, and linebreaksbr doesn’t
>>> change \n → <br>
>>>
>>> ----------------------
>>>
>>> {% load static %}
>>>
>>> <!DOCTYPE html>
>>>
>>> <head>
>>>
>>>
>>> </head>
>>>
>>> <body>
>>>
>>> <code>
>>>
>>> <p>
>>>
>>> {{somevalue | linebreaksbr}}
>>>
>>> </p>
>>>
>>> </code>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/0d366e7f-c316-4a13-ac97-947d23326105n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/0d366e7f-c316-4a13-ac97-947d23326105n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/af990e4b-e892-42e7-ba80-1ec9e0186354n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/af990e4b-e892-42e7-ba80-1ec9e0186354n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKGT9mzv9L4iw6zYFewxLZyfifrVQTRo-onhVyDVy%2BB39mTJHA%40mail.gmail.com.

Reply via email to