Example #1
0
class WorkLog(me.Document):
    origin_id = me.StringField(required=True, unique=True)
    user_id = me.StringField(required=True)
    username = me.StringField(required=True)
    time = me.DateTimeField(required=True)
    text = me.StringField(required=True)
    deleted = me.BooleanField(default=False)
Example #2
0
class EmbeddedArticle(motorengine.EmbeddedDocument):

    meta = {"collection": "test_embedded_article"}
    headline = motorengine.StringField(required=True)
    pub_date = motorengine.DateTimeField(default=datetime.now)
    editor = motorengine.ReferenceField(Editor)
    reporter = motorengine.ReferenceField("Reporter")
Example #3
0
class Article(motorengine.Document):

    meta = {"collection": "test_article"}
    headline = motorengine.StringField(required=True,
                                       help_text="The article headline.")
    pub_date = motorengine.DateTimeField(
        default=datetime.now,
        verbose_name="publication date",
        help_text="The date of first press.",
    )
    editor = motorengine.ReferenceField(Editor)
    reporter = motorengine.ReferenceField("Reporter")
Example #4
0
class MotorDocument(motorengine.Document):
    __collection__ = "MotorBenchmarkQuery"
    field1 = motorengine.StringField()
    field2 = motorengine.IntField()
    field3 = motorengine.DateTimeField(default=datetime.now)
Example #5
0
class HackerNewsStory(me.Document):
    id = me.StringField(unique=True)
    time = me.DateTimeField()
Example #6
0
class MotorDocument(motorengine.Document):
    field1 = motorengine.StringField()
    field2 = motorengine.IntField()
    field3 = motorengine.DateTimeField(default=datetime.now)
Example #7
0
class MotorDocument(motorengine.Document):
    __collection__ = "IntegrationTestDateTimeField"
    date = motorengine.DateTimeField()