Skip to content


Subversion checkout URL

You can clone with
Download ZIP


collection name should not necessary be based on class name #76

nsteinmetz opened this Issue · 2 comments

2 participants



If I understood well, the collection name is based on the class name. Which may make sense most of the time but I would have prefered them not to be tied. If you want to reuse some code throught several applications, it may be better to set collections on your own and not automatically.

For this, I think that MongoKit have a nice way to implement it :

class BlogPost(Document):
    __collection__ = 'blog_posts'
    __database__ = 'tutorial
    structure = {
            'tags': [unicode],
    required_fields = ['title','author', 'date_creation']
    default_values = {'rank':0, 'date_creation':datetime.datetime.utcnow}

Would it be possible in MongoAlchemy (which I find more complete for other stuff and with Flask-MongoAlchemy ;-) )?


Ok, thanks and sorry for the late answer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.