Thanks,
Ian
Thanks. A couple of points of clarification:
1. Are the global web2py objects (session etc.) available to classes defined in a model file?
2. You mentioned the option of writing modules to import. What's the best location for these? In the 'static' directory?
I thought it was just "import mymodule"?
And can you do "from mymodule import myfunc"?
I'm surprised that this approach doesn't seem to be well documented in the (generally outstanding) web2py book. Is it not encouraged as 'the web2py way' or is it taken for granted that people with Python knowledge can figure it out? (Or have I just missed it in there?)
Ian
I use a custom 3rd party class (named 'dabo') in web2py.
Is there any catch if I keep the class in /web2py/site-packages ?
Earlier I had kept the same in /myapp/modules folder.
But it could not be imported in model files.