Wrong assertion in __init__ of ValidationError?

2007-07-29 Thread Gilbert Fine
This is from django r5773: class ValidationError(Exception): def __init__(self, message): "ValidationError can be passed a string or a list." if isinstance(message, list): self.messages = ErrorList([smart_unicode(msg) for msg in message]) else:

Re: newforms.CharField now returns unicode, but how to specify encoding?

2007-07-27 Thread Gilbert Fine
some way to specify char encoding in Form or CharField. -- Gilbert On Jul 27, 10:15 pm, Sam Morris <[EMAIL PROTECTED]> wrote: > On Fri, 27 Jul 2007 05:42:12 -0700, Gilbert Fine wrote: > > I used django rev. 5559 for some time. After svn up today, I found > > CharField's clean

newforms.CharField now returns unicode, but how to specify encoding?

2007-07-27 Thread Gilbert Fine
I used django rev. 5559 for some time. After svn up today, I found CharField's cleaned_data is unicode. I think it is a good idea. Actually, I made this conversion in my source program. The only question is how to specify encoding of the string sent from client browser? My users almost certainly

Re: how to update a translation message in django

2007-06-10 Thread Gilbert Fine
A > translator has to check each one, verify it is correct (or correct it) > and remove the fuzzy comment. Then the result will be include in the MO > file. > > You may wish to update the file and submit a diff of the changes to Trac > so that it can be committed. > > &g

Re: how to update a translation message in django

2007-06-08 Thread Gilbert Fine
Oh, the missing msgid is "Ensure this value has at least %d characters". It appears in the po file only after I update the po file by running make-message.py On Jun 8, 7:24 pm, Gilbert Fine <[EMAIL PROTECTED]> wrote: > I am a Chinese user. I found some message is displayed

how to update a translation message in django

2007-06-08 Thread Gilbert Fine
I am a Chinese user. I found some message is displayed as English in my site. So I check the django.po under zh_CN. I found that the msgid is already in django.po, but not in django.mo. Why? I had try to update the mo using compile-message or just run msgfmt directly. The result is the same,

Re: why there is no something like HttpResponseRedirect but status is 303

2007-04-23 Thread Gilbert Fine
-HTTP/1.1 user agents do not understand the 303 status. On Apr 18, 8:57 pm, Atilla <[EMAIL PROTECTED]> wrote: > On 18/04/07,Gilbert Fine<[EMAIL PROTECTED]> wrote: > > > > > > > Hi All, > > >According to HTTP standard, the meaning of 303 status is (c

why there is no something like HttpResponseRedirect but status is 303

2007-04-18 Thread Gilbert Fine
Hi All, According to HTTP standard, the meaning of 303 status is (copied from rfc2616): 10.3.4 303 See Other The response to the request can be found under a different URI and SHOULD be retrieved using a GET method on that resource. This method exists primarily to allow the output of a

newbie hacking: fixing that raw_input() raises exception

2007-02-25 Thread Gilbert Fine
I am a newbie here. I tried to setup my first Django project. When running command "syncdb", the command got an EOFError exception from raw_input() in contrib/auth/management.py, where it was trying to ask me if I want to create a superuser. Having checking and 'truss', I found the reason should