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

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

src/f/l/Flask-User-HEAD/example_apps/roles_required_app.py   Flask-User(Download)
    user_roles = db.Table('user_roles',
        db.Column('id', db.Integer(), primary_key=True),
        db.Column('user_id', db.Integer(), db.ForeignKey('user.id', ondelete='CASCADE')),
        db.Column('role_id', db.Integer(), db.ForeignKey('role.id', ondelete='CASCADE')))
 

src/f/l/flask-admin-HEAD/examples/sqla/simple.py   flask-admin(Download)
# Create M2M table
post_tags_table = db.Table('post_tags', db.Model.metadata,
                           db.Column('post_id', db.Integer, db.ForeignKey('post.id')),
                           db.Column('tag_id', db.Integer, db.ForeignKey('tag.id'))
                           )
    date = db.Column(db.DateTime)
 
    user_id = db.Column(db.Integer(), db.ForeignKey(User.id))
    user = db.relationship(User, backref='posts')
 
    value = db.Column(db.String(64))
 
    user_id = db.Column(db.Integer(), db.ForeignKey(User.id))
    user = db.relationship(User, backref='info')
 
class Tree(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(64))
    parent_id = db.Column(db.Integer, db.ForeignKey('tree.id'))
    parent = db.relationship('Tree', remote_side=[id], backref='children')

src/f/l/Flask-Admin-1.0.8/examples/sqla/simple.py   Flask-Admin(Download)
# Create M2M table
post_tags_table = db.Table('post_tags', db.Model.metadata,
                           db.Column('post_id', db.Integer, db.ForeignKey('post.id')),
                           db.Column('tag_id', db.Integer, db.ForeignKey('tag.id'))
                           )
    date = db.Column(db.DateTime)
 
    user_id = db.Column(db.Integer(), db.ForeignKey(User.id))
    user = db.relationship(User, backref='posts')
 
    value = db.Column(db.String(64))
 
    user_id = db.Column(db.Integer(), db.ForeignKey(User.id))
    user = db.relationship(User, backref='info')
 
class Tree(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(64))
    parent_id = db.Column(db.Integer, db.ForeignKey('tree.id'))
    parent = db.relationship('Tree', remote_side=[id], backref='children')

src/f/l/Flask-SuperAdmin-HEAD/examples/sqlalchemy/simple.py   Flask-SuperAdmin(Download)
# Create M2M table
post_tags_table = db.Table('post_tags', db.Model.metadata,
                           db.Column('post_id', db.Integer, db.ForeignKey('post.id')),
                           db.Column('tag_id', db.Integer, db.ForeignKey('tag.id'))
                           )
    date = db.Column(db.DateTime)
 
    user_id = db.Column(db.Integer(), db.ForeignKey(User.id))
    user = db.relationship(User, backref='posts')
 

src/f/l/flask-security-example-HEAD/app.py   flask-security-example(Download)
# Define models
roles_users = db.Table('roles_users',
        db.Column('user_id', db.Integer(), db.ForeignKey('user.id')),
        db.Column('role_id', db.Integer(), db.ForeignKey('role.id')))
 

src/f/l/Flask-Pushrod-HEAD/examples/pushrodr/step2.py   Flask-Pushrod(Download)
    content = db.Column(db.Text, nullable=False)
 
    author_id = db.Column(db.Integer, db.ForeignKey(Author.id), nullable=False)
    author = db.relationship(Author, backref='posts')
 
    content = db.Column(db.Text, nullable=False)
 
    post_id = db.Column(db.Integer, db.ForeignKey(Post.id), nullable=False)
    post = db.relationship(Post, backref='comments')
 

src/f/l/Flask-Pushrod-HEAD/examples/pushrodr/step1.py   Flask-Pushrod(Download)
    content = db.Column(db.Text, nullable=False)
 
    author_id = db.Column(db.Integer, db.ForeignKey(Author.id), nullable=False)
    author = db.relationship(Author, backref='posts')
 
    content = db.Column(db.Text, nullable=False)
 
    post_id = db.Column(db.Integer, db.ForeignKey(Post.id), nullable=False)
    post = db.relationship(Post, backref='comments')
 

src/f/l/flask-admin-HEAD/examples/babel/simple.py   flask-admin(Download)
    date = db.Column(db.DateTime)
 
    user_id = db.Column(db.Integer(), db.ForeignKey(User.id))
    user = db.relationship(User, backref='posts')
 

src/f/l/Flask-Pushrod-HEAD/examples/pushrodr/step4.py   Flask-Pushrod(Download)
    content = db.Column(db.Text, nullable=False)
 
    author_id = db.Column(db.Integer, db.ForeignKey(Author.id), nullable=False)
    author = db.relationship(Author, backref='posts')
 
    content = db.Column(db.Text, nullable=False)
 
    post_id = db.Column(db.Integer, db.ForeignKey(Post.id), nullable=False)
    post = db.relationship(Post, backref='comments')
 

src/f/l/flask-admin-HEAD/examples/sqla-inline/simple.py   flask-admin(Download)
    path = db.Column(db.String(64))
 
    location_id = db.Column(db.Integer, db.ForeignKey(Location.id))
    location = db.relation(Location, backref='images')
 

  1 | 2 | 3 | 4 | 5 | 6  Next