If you insert any T in any module T will not work as intended because
it is not defined.

On Jun 15, 12:02 am, dlin <[email protected]> wrote:
> And, if changed to T() form.  Will that let the 'doc test' failed in
> validation functions(such as IS_NO_EMPTY())?
>
> On 6月14日, 下午7時57分, mdipierro <[email protected]> wrote:
>
> > Because T is defined in your apps but not in the modules. We could fix
> > this by redefining T using thread local variables.
> > We'll work on this.
>
> > On Jun 13, 5:28 am, dlin <[email protected]> wrote:
>
> > > I don't understand why not the invalidators' error_message only use
> > > English.
> > > eg.
> > > class IS_NOT_EMPTY(Validator):
> > >     def __init__(self, error_message='enter a value',
> > > empty_regex=None):
>
> > > why not
>
> > > class IS_NOT_EMPTY(Validator):
> > >     def __init__(self, error_message=T('enter a value'),
> > > empty_regex=None):
>
> > > I don't want to assign every IS_NOT_EMPTY's error_message.

Reply via email to