Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/f/l/flask-admin-HEAD/examples/mongoengine/simple.py   flask-admin(Download)
class User(db.Document):
    name = db.StringField(max_length=40)
    tags = db.ListField(db.ReferenceField('Tag'))
    password = db.StringField(max_length=40)
 
    done = db.BooleanField(default=False)
    pub_date = db.DateTimeField(default=datetime.datetime.now)
    user = db.ReferenceField(User, required=False)
 
    # Required for administrative interface
class Comment(db.EmbeddedDocument):
    name = db.StringField(max_length=20, required=True)
    value = db.StringField(max_length=20)
    tag = db.ReferenceField(Tag)
 

src/f/l/flask-mongorest-HEAD/example/app.py   flask-mongorest(Download)
class Post(db.Document):
    title = db.StringField(max_length=120, required=True)
    description = db.StringField(max_length=120, required=False)
    author = db.ReferenceField(User)
    editor = db.ReferenceField(User)
class B(db.Document):
    ref = db.ReferenceField(A, dbref=True)
    txt = db.StringField()
 
class C(db.Document):
    ref = db.ReferenceField(A)

src/f/l/flask-social-HEAD/tests/test_app/mongoengine.py   flask-social(Download)
        remember_token = db.StringField(max_length=255)
        authentication_token = db.StringField(max_length=255)
        roles = db.ListField(db.ReferenceField(Role), default=[])
 
        @property

src/f/l/Flask-Security-1.7.1/tests/test_app/mongoengine.py   Flask-Security(Download)
        active = db.BooleanField(default=True)
        confirmed_at = db.DateTimeField()
        roles = db.ListField(db.ReferenceField(Role), default=[])
 
    @app.before_first_request