Re: How to change the representation of newline?

2011-12-13 Thread Furbee
Yes, it is hard to determine the question. However, a stab in the dark, you are trying to get a tag to display a new line in a django template? If so, any HTML that you want to render on the display needs to be passed with the mark_safe() function. For example in views.py from

Re: How to change the representation of newline?

2011-12-13 Thread Tom Evans
2011/12/13 Germán : > Has anybody solved this issue? > > On Dec 14 2006, 2:47 pm, "Aidas Bendoraitis" > wrote: >> I ran out of ideas. :) Maybe somebody else has any thoughts regarding new >> lines? >> >> Good luck with Django! >> Aidas

Re: How to change the representation of newline?

2011-12-12 Thread Germán
Has anybody solved this issue? On Dec 14 2006, 2:47 pm, "Aidas Bendoraitis" wrote: > I ran out of ideas. :) Maybe somebody else has any thoughts regarding new > lines? > > Good luck with Django! > Aidas Bendoraitis [aka Archatas] > > On 12/14/06, zhongke chen

Re: How to change the representation of newline?

2006-12-14 Thread Aidas Bendoraitis
I ran out of ideas. :) Maybe somebody else has any thoughts regarding new lines? Good luck with Django! Aidas Bendoraitis [aka Archatas] On 12/14/06, zhongke chen <[EMAIL PROTECTED]> wrote: > firefox shows utf-8 > > my firefox is 2.0 > > On 12/14/06, Aidas Bendoraitis <[EMAIL PROTECTED]>

Re: How to change the representation of newline?

2006-12-14 Thread zhongke chen
firefox shows utf-8 my firefox is 2.0 On 12/14/06, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > And what encoding is showed in the page info? ...when you right click > somewhere in the page and choose "View Page Info" from the menu. Maybe > just the default character encoding in your firefox

Re: How to change the representation of newline?

2006-12-14 Thread Aidas Bendoraitis
And what encoding is showed in the page info? ...when you right click somewhere in the page and choose "View Page Info" from the menu. Maybe just the default character encoding in your firefox settings is set wrongly? You can always override admin templates copying them into your

Re: How to change the representation of newline?

2006-12-14 Thread zhongke chen
It's not my html page, but the django admin page. the head of admin page is like this: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;> http://www.w3.org/1999/xhtml; lang="zh-cn" xml:lang="zh-cn" > 站点管理员 no encoding here, but lang = 'zh-cn'. and all chinese characters in my pages and

Re: How to change the representation of newline?

2006-12-13 Thread Aidas Bendoraitis
It might be that it treats new lines as \r\n when you are using some windows-* encoding for your html pages. Check the source code. I would rather use UTF-8 in any case. Regards Aidas Bendoraitis [aka Archatas] On 12/13/06, zhongke chen <[EMAIL PROTECTED]> wrote: > thanks a lot. problem fixed

Re: How to change the representation of newline?

2006-12-13 Thread zhongke chen
thanks a lot. problem fixed as you said. I use Firefox under linux. does it treat newline as \r\n?? On 12/11/06, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > It seems that your browser treats new lines as under dos/windows. Is > it Konqueror? > > I would suggest you to override the save method

Re: How to change the representation of newline?

2006-12-11 Thread Aidas Bendoraitis
It seems that your browser treats new lines as under dos/windows. Is it Konqueror? I would suggest you to override the save method of your model, replacing new line characters to the preferred format: class MyModel(models.Model): body_text = models.TextField() ... def save(self):

How to change the representation of newline?

2006-12-09 Thread zhongke chen
When I input some text with newline characters in TextField under admin page, I found that the newline character in database is represented as \r\n. My django site is running at linux, other program under linux always treat newline as \n. This cause some compatible problems. How can I change the