frommongoengineimport*# To define a schema for a
# document, we create a
classMetadata(EmbeddedDocument):# class that inherits from
tags=ListField(StringField())# Document.
revisions=ListField(IntField())# Fields are specified by
classWikiPage(Document):# adding field objects as
title=StringField(required=True)# class attributes to the
text=StringField()# document class.
metadata=EmbeddedDocumentField(Metadata)# Querying is achieved by
>>>page.title="Hello, World!"# calling the objects
>>>forpageinWikiPage.objects:# attribute on a document
>>>printpage.title# class.
Want to join an open source project? Now's your chance!
Don't know what you want to help out with? Well here are some areas
that we could use help with:
MongoEngine core
MongoEngine documentation, tutorials and examples
MongoEngine framework support
MongoEngine website!
To contribute to the project, fork any repository from the mongoengine organisation on github and send a pull request, all contributions and suggestions are welcome!
If you or your company is doing something cool / interesting on mongoengine then we want to know about it!