rkopelman@mainframe.ca
At least with Python 2.3.4, it is not possible to
override the 'validator' parameter for the login and
login_required tags.
Attempting a very simple test
[[\
def validate(login, password):
return 1
]]
<spy:login_required validator="validate"/>
will result in the following error:
=================================
Spyce exception
File: /path/to/spyce/file.spy
Message:
TypeError: eval() argument 2 must be dict, not None
Stack: /usr/share/spyce/spyceCompile.py:1520, in
_evalWithImport:
eval(prefix, env)
<string>:55, in spyceProcess:
None
=================================
There appear to be two components to this problem.
#1) spyceCompile.py:_evalWithImport() is not being
passed an environment that includes the current page.
In fact, it is not being passed any environment, which
leads to the following:
#2) _evalWithImport() defaults its 'env' param to
'None' rather than an empty dictionary. This results
in the preceding exception when 'None' is passed to
eval(). This problem prevents ANY validator function
from being set, not just local ones, as it dies trying
to import foreign modules as well.
Nobody/Anonymous ( nobody ) - 2006-11-08 13:29:49 PST
5
Closed
Fixed
Nobody/Anonymous
None
None
Public
|
Date: 2007-02-01 21:36:56 PST
|
|
Date: 2007-02-01 21:33:57 PST
|