https://github.com/web2py/web2py/issues
On Monday, November 19, 2018 at 10:08:52 AM UTC-5, Lovedie JC wrote:
>
> how and where do I open this issue?
> Regards
>
> On Mon, 19 Nov 2018 at 17:46, Anthony wrote:
>
>> web2py sets cacheable=True for queries it does in the IS_IN_DB validator
>> as well
how and where do I open this issue?
Regards
On Mon, 19 Nov 2018 at 17:46, Anthony wrote:
> web2py sets cacheable=True for queries it does in the IS_IN_DB validator
> as well as in SQLFORM.grid. Please open an issue about this.
>
> Anthony
>
> On Monday, November 19, 2018 at 8:22:21 AM UTC-5, Lov
web2py sets cacheable=True for queries it does in the IS_IN_DB validator as
well as in SQLFORM.grid. Please open an issue about this.
Anthony
On Monday, November 19, 2018 at 8:22:21 AM UTC-5, Lovedie JC wrote:
>
> I've gone through the code and I haven't done any caching in selects but
> still
I've gone through the code and I haven't done any caching in selects but
still getting the message.
On Mon, 12 Nov 2018, 18:04 Leonel Câmara Don't use cache and cacheable in your selects.
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/we
Don't use cache and cacheable in your selects.
--
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
turns out to be a password issue.
'db = DAL('mongodb://localhost/connect_test')'
works well
On Tuesday, 30 October 2018 23:37:23 UTC+3, 黄祥 wrote:
>
> from the error traceback seems like a problem with a connection to
> mongodb, wrong password or username, pls ensure the authentication to
> mon
from the error traceback seems like a problem with a connection to mongodb,
wrong password or username, pls ensure the authentication to mongodb
connection is correct
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2
Saying, they can be used interchangeably if warranted.
On Saturday, May 9, 2015 at 9:34:31 AM UTC-4, Alan Etkin wrote:
>
> Question: is there an equivalent
>>
>> db().select(db.blog.author) in pymongo api? For example if I use the
>> above implementation in pymongo:
>>
>> db1.blog.author (would
Question: is there an equivalent
>
> db().select(db.blog.author) in pymongo api? For example if I use the above
> implementation in pymongo:
>
> db1.blog.author (wouldn’t work). But I can get specific author
> db1.blog.find({‘author’:’Ron’}) That is also equivalent to:
>
> db(db.blog.author == ‘
On this note: I have this blog post let’s say (with mongodb connection):
db.define_table('blog',
Field('author', 'string', requires = IS_NOT_EMPTY()),
Field('date', 'datetime', default = request.now),
Field('text', 'text'))
I can do: print d
Yes, I did!
Thanks for the advice.
But submodule when cloning web2py still doesn't work.
Best regards,
2015-05-07 16:25 GMT-03:00 Paolo Valleri :
> update your local copy of pydal, there are several updates regarding mongo
> in master branch
>
>
> Paolo
>
> 2015-05-07 21:14 GMT+02:00 José Rica
YAY
Everything is working FINE!
Thank you very much, Paolo, Massimo and others.
Cheers.
2015-05-04 10:39 GMT-03:00 Ron Chatterjee :
> What is mongodb adapter? Where do I find that info?
>
>
> On Monday, May 4, 2015 at 8:39:48 AM UTC-4, Paolo Valleri wrote:
>>
>> It should be fixed in trunk
update your local copy of pydal, there are several updates regarding mongo
in master branch
Paolo
2015-05-07 21:14 GMT+02:00 José Ricardo Borba :
> Allright!
>
> Updating pymongo to version 3.0 solves this up!
>
> Now I take care of the mongo time / pydal issue!
>
> Thanks a lot.
>
>
> 2015-05
Allright!
Updating pymongo to version 3.0 solves this up!
Now I take care of the mongo time / pydal issue!
Thanks a lot.
2015-05-07 9:05 GMT-03:00 Paolo Valleri :
> You should use pymongo 3.0
>
>
> On Wednesday, May 6, 2015 at 2:38:56 PM UTC+2, José Borba wrote:
>>
>> I'm very busy in these d
You should use pymongo 3.0
On Wednesday, May 6, 2015 at 2:38:56 PM UTC+2, José Borba wrote:
>
> I'm very busy in these days, but I tried to start a new "installation"
> from the ground (to test the TIME issue with Mongodb in pydal #170), but
> even without this correction (i.e, with plain web2py
What is mongodb adapter? Where do I find that info?
On Monday, May 4, 2015 at 8:39:48 AM UTC-4, Paolo Valleri wrote:
>
> It should be fixed in trunk
>
> Paolo
>
> On Saturday, May 2, 2015 at 1:24:32 PM UTC+2, José Borba wrote:
>>
>> OK.
>> Thank you very much again.
>>
>> Cheers.
>>
>> 2015-05-02
It should be fixed in trunk
Paolo
On Saturday, May 2, 2015 at 1:24:32 PM UTC+2, José Borba wrote:
>
> OK.
> Thank you very much again.
>
> Cheers.
>
> 2015-05-02 8:22 GMT-03:00 Paolo Valleri
> >:
>
>> Open an issue to don't forget it,I'll fix it in the next few days
>>
>> Paolo
>> On May 2, 2015
OK.
Thank you very much again.
Cheers.
2015-05-02 8:22 GMT-03:00 Paolo Valleri :
> Open an issue to don't forget it,I'll fix it in the next few days
>
> Paolo
> On May 2, 2015 1:18 PM, "José Ricardo Borba" wrote:
>
>> Paolo,
>>
>> Thank you for you quickly response. But I'm working with the lat
Open an issue to don't forget it,I'll fix it in the next few days
Paolo
On May 2, 2015 1:18 PM, "José Ricardo Borba" wrote:
> Paolo,
>
> Thank you for you quickly response. But I'm working with the latest
> web2py/Pydal 2.10.4 (downloaded 2.10.3 and updated). I forgot to mention
> this. I'm sorr
Paolo,
Thank you for you quickly response. But I'm working with the latest
web2py/Pydal 2.10.4 (downloaded 2.10.3 and updated). I forgot to mention
this. I'm sorry.
My second bet is that the parser of time (the time_itens above) need to be
modified to work with time in mongo,
Still not knowing w
Hi, try use the latest version of pydal, Mongo adapter has been recently
updated to work with pymongo 3.0
However, I think this is a bug. Can you open a bug report
on https://github.com/web2py/pydal
Paolo
On Saturday, May 2, 2015 at 3:58:13 AM UTC+2, José Borba wrote:
>
> Hi 4 All,
>
> I'm new
Exactely. The binary version is not supposed to work. It comes with its own
version of python therefore it does not see any module that you may have
installed. If you want to use modules like pymongo you must install Python,
install pymongo, AND run web2py source so it uses your own python versi
I tried binary version. It did not work. Im trying to subscribe to
CouchDB or MongoDB online and test it instead running my db local machine.
thanks for the help.
On Friday, November 28, 2014 6:51:15 PM UTC-5, Massimo Di Pierro wrote:
>
> Are you using the source version of the binary versio
Are you using the source version of the binary version of web2py? The
binary version comes his own python version.
On Wednesday, 26 November 2014 09:42:56 UTC-6, Oliver wrote:
>
> Hi All,
>
> anyone have success using MongoDb in DAL? When I ran web2py, I don't see
> MongoDB listed.
>
> here is
Please open a ticket on google code.
On Sunday, 23 February 2014 07:06:57 UTC-6, Mr. J.S Jones wrote:
>
> When using upload fields with mongodb and SQLFORM (not factory forms) I
> get the runtime error " you must specify a
> Field(...,uploadfolder=...)" the same code but switching to sqlite work
> Thanks for the answer. Luckily there are no joins, but I need to see what
> web2py features of DAL won't work.
>
To my knowledge, you cannot use the scheduler or Auth.accessible_query,
everything else not requiring join queries should work.
--
Resources:
- http://web2py.com
- http://web2py
Hey,
Thanks for the answer. Luckily there are no joins, but I need to see what
web2py features of DAL won't work.
Thanks,
Regards,
Tushar Tuteja
On 30 December 2013 16:44, Alan Etkin wrote:
> I have an app running on MySQL , I want to use mongoDB instead.
>> I want to help on migration from my
>
> I have an app running on MySQL , I want to use mongoDB instead.
> I want to help on migration from mysql to mongoDB.
> Thanks,
>
Beware that mongodb adapter is in an experimental stage of development, so
you should know what you are doing before migrating. I suppose there are
lots of howto
>
> I suppose it is ok but should be tested. Please file an issue at
> http://code.google.com/p/web2py/issues
>
http://code.google.com/p/web2py/issues/detail?id=1777
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- ht
>
> and it returns the same error. The thing is how do I fix this? I tried:
>
> 5405elif fieldtype == "blob":
> if value== None:
>
>
> But ain't sure if that is right or not.
>
I suppose it is ok but should be tested. Please file an issue at
http://code.google.com/p/we
> went into problem when I tried to use it for large object.
Please post the issue here if you think it's the adapter's fault:
http://code.google.com/p/web2py/issues
Adding any code and environment information needed to reproduce it.
--
Resources:
- http://web2py.com
- http://web2py.com/book (
>
> Hi,
> can anyone advise the current status of web2py support of mongodb?
> thanks
>
The MongoDBAdapter is experimental, and implements all standard DAL
commands.
https://groups.google.com/d/msg/web2py/ify9tjXSooU/y0ZYx1Z3v8cJ
--
Resources:
- http://web2py.com
- http://web2py.com/book (Doc
Thanks Alan.
On Saturday, 8 June 2013 10:22:35 UTC-5, Alan Etkin wrote:
>
> I created an issue so we can fix this
>
> http://code.google.com/p/web2py/issues/detail?id=1519
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe
I created an issue so we can fix this
http://code.google.com/p/web2py/issues/detail?id=1519
--
---
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+unsubsc
> values[fieldname] = [self.object_id(x) for x in v]
Note: there's no need to add the loop for creating the object id's since
that is handled by the adapter represent method (that is the behavior with
update).
It should be enough to just test for
(line 5337)
if fieldtype.startswith("reference"
update seems to work fine with list:reference as long as the field's value
is actually an iterable. I'll do some more testing and make a pull request
later. Thanks!
On Tuesday, June 4, 2013 2:17:37 PM UTC-4, Alan Etkin wrote:
>
> By the way, I can get around this by changing this line in
>> M
> By the way, I can get around this by changing this line in
> MongoDBAdapter's insert function in dal.py:
> values[fieldname] = self.object_id(v)
>
> to this:
> if isinstance(v,list):
> values[fieldname] = [self.object_id(x) for x in v]
> else:
> values[fieldname] = self.object_id(v)
>
>
> At the moment MongodbAdapter only has these filetypes
The MongoDBAdapter now supports storing JSON documents, plus a json widget
and IS_JSON validator. See this slice for more details:
http://www.web2pyslices.com/slice/show/1580/save-the-earth-from-a-total-data-mess-with-mongodbadapter
--
The problem is that dal+mongo does not handle references right because of
this. It must be refactored.
On Tuesday, 23 October 2012 12:27:56 UTC-5, Adi wrote:
>
> my fault Niphlod clarified that can't use mongodb for Auth
> functionality, so I left that part with mysql, otherwise created tabl
my fault Niphlod clarified that can't use mongodb for Auth
functionality, so I left that part with mysql, otherwise created table
(colletion), inserted records and displayed smartgrid. All worked fine,
except viewing record details from smartgrid.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13
Saw that it was still considered experimental, still might give it a try if
the only thing that is not working is the whole blob thing, as what I am
really interested in storing and whole documents in it.essentially I am
after the the entire JSON representation of document, and the ability to
r
The mongodb support in DAL is experimental. Thanks for helping test it. We
could use some help in this area.
On Saturday, 29 September 2012 21:35:09 UTC-5, Jose Galvez wrote:
>
> I am trying to run through the image blog example from the docs using
> mongodb. when I try to upload an image I get
Can you email me a patch with your change.
On Tuesday, 12 June 2012 12:31:50 UTC-5, Michael Freitas wrote:
>
> Thanks, The latest trunk sorted out the import error. I also changed
>
> #import pymongo.objectid --> import bson.objectid
>
> and replaced all references. With my limited testing so f
Thanks, The latest trunk sorted out the import error. I also changed
#import pymongo.objectid --> import bson.objectid
and replaced all references. With my limited testing so far it seems to be
working.
If I try to register a new user with auth in mogodb I get the same error
reported here
Have a possible fix in trunk. Give it a try.
On Monday, 11 June 2012 20:47:48 UTC-5, Michael Freitas wrote:
>
> I tried to setup a new application using the latest source code form trunk
> and mongodb. I get the error pasted at the end when I try to register a
> new user in my app. I tried cha
I think if that is what you want to do, you go beyond the scope of the dal
and perhaps you should use the mongodb api instead of the dal. Perhaps we
should discuss it on web2py developers. Anyway, feel free to open a ticket
about this.
On Monday, 21 May 2012 04:55:01 UTC-5, Francisco Costa wrot
requested here:
https://groups.google.com/d/topic/web2py/pqdYpUbMXKQ/discussion
On Monday, May 14, 2012 2:35:43 AM UTC+1, Massimo Di Pierro wrote:
>
> I think you can already
>
> db.table.insert(**dict())
>
> Are you asking for something different?
>
> On Saturday, 12 May 2012 05:25:02 UTC-5,
I will wait when you are done than... when you think this should be
included, perhaps it will be easier to upload the dal.py as an issue in
google code so I will not miss it.
On Thursday, 17 May 2012 21:06:46 UTC-5, Krzysztof Mulica wrote:
>
> Yes latest trunk, but i'm working through a few more
Did you apply your changes to the latest trunk. If so, could you post your
changes. We will review them and probably incorporate them.
massimo
On Thursday, 17 May 2012 19:46:00 UTC-5, Krzysztof Mulica wrote:
>
> Hello,
> I'm having issues with the mongo adapter doing selects (using latest code
I'm guessing he's looking for something like I am,
http://cookbook.mongodb.org/patterns/count_tags/
{
"title" : "A blog post",
"author" : "Kristina",
"content" : "...",
"tags" : ["MongoDB", "Map/Reduce", "Recipe"]
}
using DAL, how would I go about inserting that list, what wo
I think you can already
db.table.insert(**dict())
Are you asking for something different?
On Saturday, 12 May 2012 05:25:02 UTC-5, Francisco Costa wrote:
>
> It works Massimo!
> In MongoDb is also common to insert dicts, can we also have that?
>
> At the moment it only saves in the string fo
It works Massimo!
In MongoDb is also common to insert dicts, can we also have that?
At the moment it only saves in the string format (check player Field)
{ "_id" : ObjectId("4fae3839b34f4brf5a31"), "city" : "Madrid", "club" :
"Real Madrid", *"player" : "{'n_goals': 43, 'name': 'Ronaldo'}"* }
One more try please.
On Friday, 11 May 2012 06:04:52 UTC-5, Francisco Costa wrote:
>
> Thanks Massimo. Please let me know if you need more help in debugging it
>
> On Friday, May 11, 2012 12:40:35 AM UTC+1, Massimo Di Pierro wrote:
>>
>> Now I understand better where all these problems come from.
the latest DAL produces this error
users = mongo(mongo.user.age==18).select()
File "/opt/web2py/gluon/dal.py", line 8004, in select
return adapter.select(self.query,fields,attributes)
File "/opt/web2py/gluon/dal.py", line 4528, in select
colnames = [fix(column) for column in mongo_
Thanks Massimo. Please let me know if you need more help in debugging it
On Friday, May 11, 2012 12:40:35 AM UTC+1, Massimo Di Pierro wrote:
>
> Now I understand better where all these problems come from. I shall fix it
> tonight.
>
> On Thursday, 10 May 2012 18:02:24 UTC-5, Francisco Costa wrote
Now I understand better where all these problems come from. I shall fix it
tonight.
On Thursday, 10 May 2012 18:02:24 UTC-5, Francisco Costa wrote:
>
> i didn't understand your question..
> This is the complete code
>
> import sys
> import time
> from gluon.dal import DAL, Field
> mongo = DAL('mo
i didn't understand your question..
This is the complete code
import sys
import time
from gluon.dal import DAL, Field
mongo = DAL('mongodb://localhost:27017/sapo')
mongo.define_table('user',
Field('name', 'text'),
Field('age', 'integer'),
What's the model?
On Thursday, 10 May 2012 16:27:51 UTC-5, Francisco Costa wrote:
>
> I found another problem!!
>
> if you do this:
> mongo.user.insert(name='Jim', age=18, city='Detroit')
> mongo.user.insert(name='Jack', age=18)
>
> and then select
> users = mongo(mongo.user.age==18).
I found another problem!!
if you do this:
mongo.user.insert(name='Jim', age=18, city='Detroit')
mongo.user.insert(name='Jack', age=18)
and then select
users = mongo(mongo.user.age==18).select()
you don't have the field "city" in one of the rows, so you get this error:
users = m
Just add a '\' at the end of line 4664 and your are done!
Great job Massimo!
On Thursday, May 10, 2012 9:12:48 PM UTC+1, Massimo Di Pierro wrote:
>
> This helps. I have another attempt to fix this in trunk. Hard to test it
> since I do not have mongodb installed.
>
> On Thursday, 10 May 2012 08
This helps. I have another attempt to fix this in trunk. Hard to test it
since I do not have mongodb installed.
On Thursday, 10 May 2012 08:39:22 UTC-5, Francisco Costa wrote:
>
> Still not working. I think Fields order is wrong.
>
> At the end of the select() function I write this:
>
> a
Still not working. I think Fields order is wrong.
At the end of the select() function I write this:
a = []
for f in fields:
a.append(f.type)
return dict(rows=rows, fields=a, colnames=colnames)
and I got this:
colnames:
city
age
_id
name
fields:
id
text
intege
Please try trunk again.
On Thursday, 10 May 2012 01:03:22 UTC-5, kokoyo wrote:
>
> Hi Massimo, i did it and get output (test on user_auth table):
>
> mongoqry_dict ={'email': 'myem...@gmail.com'}
> mongofields_dict = SON([('id':1), ('first_name':1), ('last_name':
> 1), ('email':1), ('password':1
I've enumerated fields and colnames and they are like this:
fields:
id
text
integer
string
colnames:
city
age
_id
name
I believe they don't match and thats why there's this error:
File "/opt/web2py/gluon/dal.py", line 8134, in select
return adapter.select(self.query,fields,attributes)
File
Hi Massimo, i did it and get output (test on user_auth table):
mongoqry_dict ={'email': 'myem...@gmail.com'}
mongofields_dict = SON([('id':1), ('first_name':1), ('last_name':
1), ('email':1), ('password':1), ('registration_key':
1), ('reset_password_key':1), ('registration_id':1) ])
mongo_list_d
Should be an easy fix but I need your help. Before line 4711 of dal.py
return processor(rows,fields,colnames,False)
can you add
print rows
print fields
print colnames
what is the output when it fails?
On Wednesday, 9 May 2012 05:42:56 UTC-5, Francisco Costa wrote:
>
> I've enumerated fields a
Seems DAL alway looks the first "column" if all tables is ID field (after
remove _id column from mongo)
{ "_id" : ObjectId("4de83c816afb62e8367163b1"), "first_name" : "koko",
"last_name":"yo", "password" } *
*
On Wednesday, May 9, 2012 7:42:56 PM UTC+9, Francisco Costa wrote:
>
> I've
Lets hope Massimo fix that today in trunk
On Wednesday, May 9, 2012 12:28:50 PM UTC+1, kokoyo wrote:
>
> Hi Costa , first im sorry for my wrong post above,It should be a new
> post with new question. Actually i have same problem like you,
> i did a quick test and have not solved this issue yet,
Hi Costa , first im sorry for my wrong post above,It should be a new post
with new question. Actually i have same problem like you,
i did a quick test and have not solved this issue yet, here is what i did:
set driver to use mongodb in: DB.py :
if not request.env.web2py_runtime_gae:
## if
I've enumerated fields and colnames and they are like this:
fields:
id
text
integer
string
colnames:
city
age
_id
name
I believe they don't match and thats why there's this error:
File "/opt/web2py/gluon/dal.py", line 8134, in select
return adapter.select(self.query,fields,attributes)
File "
Hello, i got this error when tried pymongo and web2py:
On Linux:
cannot import name son
.
rows = self.dbset(field == value, ignore_common_filters =
self.ignore_common_filters).select(limitby=(0, 1))
File "/home/kokoyo/webapps/w2p/web2py/gluon/dal.py", line 8134, in select
return ad
Now i get this error:
File "/opt/web2py/gluon/dal.py", line 8134, in select
return adapter.select(self.query,fields,attributes)
File "/opt/web2py/gluon/dal.py", line 4711, in select
return processor(rows,fields,colnames,False)
File "/opt/web2py/gluon/dal.py", line 1681, in parse
Please try again.
On Monday, 7 May 2012 15:48:04 UTC-5, Francisco Costa wrote:
>
> missing a colon at the end of the line 4677
>
> if key == 'id'
>
>
> and now I get this error
>
> File "/opt/web2py/gluon/dal.py", line 8134, in select
> return adapter.select(self.query,fields,attributes)
>
missing a colon at the end of the line 4677
if key == 'id'
and now I get this error
File "/opt/web2py/gluon/dal.py", line 8134, in select
return adapter.select(self.query,fields,attributes)
File "/opt/web2py/gluon/dal.py", line 4711, in select
return processor(rows,columns,False)
Thanks for your help and check on this. I just committed a fix in trunk
that should address it. Please let me know.
On Monday, 7 May 2012 15:19:40 UTC-5, Francisco Costa wrote:
>
> I think that the mongofields_dict.keys() don't match to the data in the
> rows
>
> mongofields_dict:
> id
> name
>
I think that the mongofields_dict.keys() don't match to the data in the rows
mongofields_dict:
id
name
age
city
rows:
Toronto
66L
24652490551171733682233802752L
John
On Monday, May 7, 2012 8:42:33 PM UTC+1, Massimo Di Pierro wrote:
>
> Your linennumbers do not much the code in trunk. Please try
Your linennumbers do not much the code in trunk. Please try the code in
trunk. Anyway, something goes wrong in the parse(self, rows, fields,
colnames, blob_decode=True) function. I suspect mongo does not return the
columns in the order web2py think it does. Can you print the input of the
parse
Problem solved. I was using binary distro that doesn't look for installed
python modules. Running form source solves the problem.
On Wednesday, March 7, 2012 10:25:35 AM UTC-5, rdodev wrote:
>
> I'm running the nightly build of web2py, python 2.7, have pymongo
> installed and mongodb is running.
mongodb gets a lot of attention, has a fairly large userbase and even
dedicated database hosting for scalability. They do a lot of marketing
to expand their userbase from Rails to Django to PHP users are using
it!
I think it is fair that they want to work on the mongodb adapter. It
will help expan
Found another error, but I can't figure out an solution.
But it must be rather simple.
I use the following model and without auth ofcourse
if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
dbp = DAL('mysql://root:MerMB#2#@192.168.2.29/perf
yes.
On Oct 21, 2:55 am, Mark Breedveld wrote:
> Dear Massimo,
>
> I downloaded the trunk and I am currently testing the MongoDB Adapter
> and I can tell that inserting currently isn't working. Also the
> creation of tables doesn't work.
>
> First question, shall I put the bugs and improvements t
On Wed, 2011-10-12 at 04:07 -0700, David Marko wrote:
> Massimo adviced me to use something like this previsously:
>
> def make_connection():
> from pymongo import Connection
> connection = Connection('localhost', 27017)
> return connection
>
> connection = cache.ram('mongodb'
Shouldnt the cache.ram('mongodb', make_mongo_connection, 0) has the None
instead of 0? Having 0 it doesnt work as a cache as it refreshes connection
on each request ...
Here is what I use (in a file models/0.py):
import pymongo
from pymongo import ASCENDING, DESCENDING
def make_mongo_connection():
mdb = pymongo.Connection()
return mdb
mdb = cache.ram('mongodb', make_mongo_connection, 0)
# in the code I use mdb as needed.
# On a busy site, it may make s
Both can be in db.py file and so available for entire application = to other
db_xx.py files and controlers ... the same thing as standard 'db' sql
connection variable defined in db.py by default.
On Oct 12, 12:07 pm, David Marko wrote:
> Massimo adviced me to use something like this previsously:
>
> def make_connection():
> from pymongo import Connection
> connection = Connection('localhost', 27017)
> return connection
>
> connection = cache.ram('mongodb',make_connection,Non
Massimo adviced me to use something like this previsously:
def make_connection():
from pymongo import Connection
connection = Connection('localhost', 27017)
return connection
connection = cache.ram('mongodb',make_connection,None)
It seemed to work but I had no opportunity to
we use it in db.py, not sure where should be the optimal way for it
On Oct 12, 11:52 am, David Marko wrote:
> Assume this code is in some db.py file ... so its executed on every request
> ...?
Assume this code is in some db.py file ... so its executed on every request
...?
On Oct 12, 11:00 am, David Marko wrote:
> Hi Francisco, how do you manage the connection to MongoDB server? Do you
> establish and close connection on every request or do you use some
> connection pooling ?
Hi Marko,
for now we are using pymongo like this:
from pymongo import Connection
server =
Hi Francisco, how do you manage the connection to MongoDB server? Do you
establish and close connection on every request or do you use some
connection pooling ?
we use the DAL for MySQL and pymongo for MongoDB
We are changing everything to MongoDS, so we have some interest in
being able to write MongoDB queries trough the DAL so we woulnd't have
to change lots of code
On Oct 3, 9:57 am, ~redShadow~ wrote:
> On Sun, 2011-10-02 at 14:52 -0700, Francisco C
I am confused. Did you use
db = DAL('mongodb://')
db.define_table()
db.mytable.insert()
or just the mongodb api?
On Oct 2, 5:53 pm, Bruno Rocha wrote:
> I used that for some samples and talks, also for a small project. as I I am
> not doing advanced operations I cant say if it works
I used that for some samples and talks, also for a small project. as I I am
not doing advanced operations I cant say if it works or not. But for my
sample needs worked very well.
On Sun, Oct 2, 2011 at 7:39 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> At this time my priority is t
At this time my priority is to finish document the rest of
undocumented web2py features. I will work on this as soon as I finish
that.
Anyway, in dal.py there is a mongodb adapter. It can only do insert.
Has anybody tried that?
massimo
On Oct 2, 4:52 pm, Francisco Costa wrote:
> I don't want to
> Are you planning to resume development? I'd need the MongoDBAdapter
> for a project, and I am willingly to cooperate.
> I'm quite new both to MongoDB and web2py but I'm learning fast; the
> only problem I see is the apparent lack of documentation on which
> methods an adapter should implement and
On Aug 8, 3:30 pm, DenesL wrote:
> I was, a while back, just before the new dal.
> The changes in the dal plus a busier work day conspired to kill the
> effort.
>
> On Aug 7, 1:54 pm, Francisco Costa wrote:
>
> > Is anyone working on the MongoDBAdapter?
Are you planning to resume development? I'
My understanding is that pymongo has connection pooling builtin. ->
http://api.mongodb.org/python/current/api/pymongo/connection.html
Also, it appears that an addition to the cache method described by
Massimo enables the use replica sets as well.
You still need to handle AutoReconnect exceptions w
I'm still looking for a solution to simulate connection pooling, any
responses would be great - thanks!
On Jul 21, 4:53 pm, Karthik wrote:
> Hi Massimo,
>
> Thanks for this. Do you know if it will hold up in a high performance
> situation though?
> As in, if multiple connections originate at the
I was, a while back, just before the new dal.
The changes in the dal plus a busier work day conspired to kill the
effort.
On Aug 7, 1:54 pm, Francisco Costa wrote:
> Is anyone working on the MongoDBAdapter?
1 - 100 of 128 matches
Mail list logo