Change the way Validator.translator is assigned so Validators can use self.translator
This commit is contained in:
+1
-1
@@ -429,7 +429,7 @@ def build_environment(request, response, session, store_current=True):
|
||||
c = environment['cache'] = Cache(request)
|
||||
|
||||
# configure the validator to use the t translator
|
||||
Validator.translator = T
|
||||
Validator.translator = staticmethod(lambda text: None if text is None else str(T(text)))
|
||||
|
||||
if store_current:
|
||||
current.globalenv = environment
|
||||
|
||||
Reference in New Issue
Block a user