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 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---