Skip to content

Instantly share code, notes, and snippets.

View bagerard's full-sized avatar

Bastien Gérard bagerard

  • Brussels, Belgium
View GitHub Profile
from mongoengine import connect, Document, EmbeddedDocument, \
ReferenceField, EmbeddedDocumentListField, StringField, ObjectIdField
connect() # Connect to `test` database by default
######
# Option1: Using 2 different collections for users and tickets
######
class User(Document):
name = StringField()