I'm trying to use a standalone version of web2py's DAL. I have looked at a couple other posts (here and the link referenced therein) but still haven't been able to solve the problem. What I have done is copied the gluon folder from the web2py directory into my diretory, and then I do an import statement such as:
from gluon import DAL, Field
which causes the following error:
File "/home/ec2-user/myproject/gluon/globals.py", line 26, in <module>
from gluon.utils import web2py_uuid, secure_dumps, secure_loads ImportError: cannot import name secure_dumps
I've checked that utils.py exists in the gluons folder and the secure_dumps function is defined therein. Appreciate if anyone can provide some advice on how to resolve this error.
The solution to this problem was to use gluino
instead of gluon
. gluino
is a port of web2py to Bottle and other web frameworks and can be downloaded here.