Also, you could use css to set whitespace to pre-wrap.


On 2008-08-26, Daniel Roseman <[EMAIL PROTECTED]> wrote:
>
> On Aug 26, 10:12 am, Will Rocisky <[EMAIL PROTECTED]> wrote:
>> I am taking an input from user in text area, like comments.
>> but when I print them, they all display in one line.
>> how can I format them to display exactly how use entered them? (new
>> lines, tabs etc)
>
> When you say 'print' I presume you mean on a web page.
> HTML ignores white space like carriage returns - so you need to mark
> up the line breaks specifically. Luckily Django has a filter to do
> this: linebreaks. So you just do {{ comment|linebreaks }}
>
> --
> DR
> >
>

-- 
Sent from Gmail for mobile | mobile.google.com

John Lenton ([EMAIL PROTECTED]) -- Random fortune:
The trouble with a lot of self-made men is that they worship their creator.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to