You need to import Rows from pydal.objects
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/C31RurYvstc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/6ea3bcf5-d419-453d-8a5d-837af3d661f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
class Pear:
pass
def shake():
return Pear()
import peartree
mypear = peartree.shake()It basically has to do with python namespaces. You did not import Rows into your current namespace. The definition is there in the context where the select rows were created but in your namespace you could have another Rows definition that is quite different or none at all. Web2py imports a lot of stuff automatically so I can see how that can create confusion when something isn't automatically available but that's just the way regular python works.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/C31RurYvstc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/4155af72-1560-4c72-8567-1481329b6e4a%40googlegroups.com.