Dear users, 
I have a dilemma of how to access mongoDB and pymongo in the best way using 
DAL and pymongo.

Could you please explain how to use the approach of using pymongodb 
connection via 
" mycon = db._adapter.connection" and what would be the difference between 
it and normal DAL connection to mongoDB. Can you tell what is the best 
connect to pymongo lib in web2py application. As I saw thinks like(
https://groups.google.com/forum/#!searchin/web2py/db._adapter.connection/web2py/TH7jCeFicmU/kzuAkHGooX0J
):

def make_connection(): 
 from pymongo import Connection 
 connection = Connection('localhost', 27017) 
return connection 

connection = cache.ram('mongodb',make_connection,None) 

I am not sure weather it is old or new tricks. It would be great to know 
what is the best approach as I could not find enough info on it even though 
i have tried to read all post on web2py group about pymongo subject.

Thank you in advance.

-- 
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 the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to