On Feb 1, 2010, at 12:36 PM, Paul Everitt wrote:

> 
> On Feb 1, 2010, at 12:35 PM, Tres Seaver wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> 
>> Joan Miller wrote:
>>> Does anybody could write a little example about how to set up a
>>> MongoDB (through Ming [1]) data store with BFG?
>>> 
>>> This one to be used in TG2 [2]
>>> 
>>> 
>>> [1] http://merciless.sourceforge.net/
>>> [2] http://bitbucket.org/percious/c5t/src/tip/c5t/core/model/auth.py
>> 
>> - From what I can tell, the model classes in the c5t example would  
>> work
>> pretty much unchanged in a BFG app:  if you used routes instead of
>> traversal, the views could use the same pattern for finding the model
>> objects.
>> 
>> I think Reed O'Brian was doing some work on Mongo-based BFG apps. I've
>> CC'ed him just in case he missed seeing your post.

way behind on mailing lists.

> 
> http://svn.repoze.org/playground/redir/repoze.mongo/trunk/

Unfortunately that code in that repo is pretty misconceived. Robert Marianski 
and I spent a couple days at pycon last year and produced the above code which 
should really be forgotten. 

Since then pymongo has grown several features and a couple other packages for 
working with mongo have surfaced; namely ming and mongokit. I like aspects of 
both, but neither seems near perfect. To date i haven't used mongo in a 
production system. I expect to be using mongodb within the next year. So if 
anyone is at pycon sprints and wants to give it another go I would be happy to.

As for using mongo and ming with bfg, I haven't done it yet. It would be easy 
enough to wire it up something like so..

http://svn.repoze.org/playground/redir/ming_tut/trunk/

The above code is just modified from the sqlalchemy paster template.

Cheers,
~ro
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to