marrow / WebCore

WebCore, the super tiny and blazingly fast modular Python web nanoframework.
MIT License
96 stars 9 forks source link

Added support for MongoEngine connection alias #91

Closed aGHz closed 12 years ago

aGHz commented 12 years ago

You need this if you want multiple simultaneous MongoEngine connections.

One issue is that the middleware goes through the model module's all and adds the alias to every class's _meta['db_alias'], which is a MongoEngine private. I like this for myself cause it's easy, I don't have to add a meta = {'db_alias': alias} to every model class, but it might not be appropriate for WebCore as a framework, because of black magic. Your call.