Here is a webfolder plug-in. It is still quite raw.
http://jaguar.biologie.hu-berlin.de/~fkrause/web2py.plugin.webfolder.w2p
Feel free to use and improve it.
It depends on an improved IS_IN_SET validator. To use the plug-in you
need to replace the constructor of IS_IN_SET (gluon/validators.py)
with
def __init__(
self,
theset,
labels=None,
error_message='value not allowed',
multiple=False,
zero='',
sort=False,
):
self.multiple = multiple
self.labels = labels
if theset and (isinstance(theset[0], list) or isinstance(theset
[0], tuple)) and len(theset[0])==2:
self.theset = [str(item) for item,label in theset]
self.labels = [str(label) for item,label in theset]
else:
self.theset = [str(item) for item in theset]
if isinstance(theset, dict):
self.labels = theset.values()
self.error_message = error_message
self.zero = zero
self.sort = sort
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.