Re: Encoding in models.py (and maybe other files too)

2007-04-20 Thread ashwoods
ops. my wrong. so the only way to keep it "clean" is using i18n. might be an overkill for small apps in one languange though. On Apr 19, 1:46 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-04-19 at 10:45 +, ashwoods wrote: > > ah, i code for english, german, spanish. :) > >

Re: Encoding in models.py (and maybe other files too)

2007-04-19 Thread Malcolm Tredinnick
On Thu, 2007-04-19 at 10:45 +, ashwoods wrote: > ah, i code for english, german, spanish. :) > > but as far as i know, the encoding declaration is only needed if you > have special chars in _code_ as opposed to strings. your strings can > be unicode without having to declare an encoding for

Re: Encoding in models.py (and maybe other files too)

2007-04-19 Thread [EMAIL PROTECTED]
On 19 avr, 12:45, ashwoods <[EMAIL PROTECTED]> wrote: > ah, i code for english, german, spanish. :) > > but as far as i know, the encoding declaration is only needed if you > have special chars in _code_ as opposed to strings. your strings can > be unicode without having to declare an encoding fo

Re: Encoding in models.py (and maybe other files too)

2007-04-19 Thread ashwoods
ah, i code for english, german, spanish. :) but as far as i know, the encoding declaration is only needed if you have special chars in _code_ as opposed to strings. your strings can be unicode without having to declare an encoding for the python file. my opinion is that if you can, you should e

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread Atilla
On 18/04/07, mamcxyz <[EMAIL PROTECTED]> wrote: > > > Yes, instead of naming your models with "funky" characters, you can > > always set the verbose displayed name to whatever you need it to be. > > The are not funky. Are the normal characters in each labguage. Anyway, > that show too if the "funk

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread mamcxyz
> Yes, instead of naming your models with "funky" characters, you can > always set the verbose displayed name to whatever you need it to be. The are not funky. Are the normal characters in each labguage. Anyway, that show too if the "funky" chars appear in "text" so --~--~-~--~~

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread Atilla
> >> just asking :) > > > > I don't know about Nicolas, but I'm writing something for a > > Spanish-speaking customer, so I might have a TelephoneField > > ("teléfono") in there, for example. > > the way to do it is verbose_name = _("telephone") Yes, instead of naming your models with "funky" char

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread Kenneth Gonsalves
On 18-Apr-07, at 5:44 PM, John Lenton wrote: >> >> just asking :) > > I don't know about Nicolas, but I'm writing something for a > Spanish-speaking customer, so I might have a TelephoneField > ("teléfono") in there, for example. the way to do it is verbose_name = _("telephone") -- regards k

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread John Lenton
On 4/18/07, ashwoods <[EMAIL PROTECTED]> wrote: > > maybe a little off-topic, but why do you need special characters in > code? it makes code maintainance and reusability a bit more difficult, > while there are not really a lot of situations where its necesary. > > just asking :) I don't know ab

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread [EMAIL PROTECTED]
On 18 avr, 13:39, ashwoods <[EMAIL PROTECTED]> wrote: > maybe a little off-topic, but why do you need special characters in > code? it makes code maintainance and reusability a bit more difficult, > while there are not really a lot of situations where its necesary. > > just asking :) Because fre

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread ashwoods
maybe a little off-topic, but why do you need special characters in code? it makes code maintainance and reusability a bit more difficult, while there are not really a lot of situations where its necesary. just asking :) --~--~-~--~~~---~--~~ You received this m

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread [EMAIL PROTECTED]
On 18 avr, 05:16, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Not really -- although in that case there would be slightly more value > in adding the encoding line, since bytestrings that aren't UTF-8 encoded > will break in interesting ways. > > My main reason for not adding this: if you forge

Re: Encoding in models.py (and maybe other files too)

2007-04-17 Thread Malcolm Tredinnick
On Tue, 2007-04-17 at 16:11 +, [EMAIL PROTECTED] wrote: > Hi, > > As I use characters with accents, I got the following issue yesterday > when validating my models : > > mvmo.cv: Non-ASCII character '\xc3' in file /home/django/mvmo/../mvmo/ > cv/models. > py on line 111, but no encoding decl

Encoding in models.py (and maybe other files too)

2007-04-17 Thread [EMAIL PROTECTED]
Hi, As I use characters with accents, I got the following issue yesterday when validating my models : mvmo.cv: Non-ASCII character '\xc3' in file /home/django/mvmo/../mvmo/ cv/models. py on line 111, but no encoding declared; see http://www.python.org/peps/pep-026 3.html for details (models.py,