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

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

src/f/l/Flask-User-HEAD/example_apps/roles_required_app.py   Flask-User(Download)
    # Define the User-Roles pivot table
    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')))
 
    # Define Role model
    class Role(db.Model):
        id = db.Column(db.Integer(), primary_key=True)
        name = db.Column(db.String(50), unique=True)

src/f/l/Flask-Pushrod-HEAD/examples/pushrodr/step2.py   Flask-Pushrod(Download)
class Author(db.Model):
    __tablename__ = "authors"
 
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    name = db.Column(db.String(80), unique=True, nullable=False)
    description = db.Column(db.Text(), nullable=False)
class Post(db.Model):
    __tablename__ = "posts"
 
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    timestamp = db.Column(db.DateTime, nullable=False, default=now())

src/f/l/Flask-Pushrod-HEAD/examples/pushrodr/step1.py   Flask-Pushrod(Download)
class Author(db.Model):
    __tablename__ = "authors"
 
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    name = db.Column(db.String(80), unique=True, nullable=False)
    description = db.Column(db.Text(), nullable=False)
class Post(db.Model):
    __tablename__ = "posts"
 
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    timestamp = db.Column(db.DateTime, nullable=False, default=now())

src/f/l/Flask-Pushrod-HEAD/examples/pushrodr/step4.py   Flask-Pushrod(Download)
class Author(db.Model):
    __tablename__ = "authors"
    __pushrod_fields__ = ("name", "description")
 
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    name = db.Column(db.String(80), unique=True, nullable=False)
    description = db.Column(db.Text(), nullable=False)
class Post(db.Model):
    __tablename__ = "posts"
 
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    timestamp = db.Column(db.DateTime, nullable=False, default=now())

src/f/l/Flask-Pushrod-HEAD/examples/pushrodr/step3.py   Flask-Pushrod(Download)
class Author(db.Model):
    __tablename__ = "authors"
 
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    name = db.Column(db.String(80), unique=True, nullable=False)
    description = db.Column(db.Text(), nullable=False)
class Post(db.Model):
    __tablename__ = "posts"
 
    id = db.Column(db.Integer, primary_key=True, nullable=False)
    timestamp = db.Column(db.DateTime, nullable=False, default=now())

src/f/l/Flask-User-HEAD/example_apps/basic_app.py   Flask-User(Download)
    class User(db.Model, UserMixin):
        id = db.Column(db.Integer, primary_key=True)
        active = db.Column(db.Boolean(), nullable=False, default=False)
        email = db.Column(db.String(255), nullable=False, unique=True)
        password = db.Column(db.String(255), nullable=False, default='')
        username = db.Column(db.String(50), nullable=False, unique=True)

src/f/l/flask-admin-HEAD/examples/sqla/multiple_pk.py   flask-admin(Download)
class Car(db.Model):
    __tablename__ = 'cars'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    desc = db.Column(db.String(50))
 
class Tyre(db.Model):
    __tablename__ = 'tyres'
    car_id = db.Column(db.Integer, db.ForeignKey('cars.id'), primary_key=True)
    tyre_id = db.Column(db.Integer, primary_key=True)
    car = db.relationship('Car', backref='tyres')
    desc = db.Column(db.String(50))

src/f/l/Flask-Admin-1.0.8/examples/sqla/multiple_pk.py   Flask-Admin(Download)
class Car(db.Model):
    __tablename__ = 'cars'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    desc = db.Column(db.String(50))
 
class Tyre(db.Model):
    __tablename__ = 'tyres'
    car_id = db.Column(db.Integer, db.ForeignKey('cars.id'), primary_key=True)
    tyre_id = db.Column(db.Integer, primary_key=True)
    car = db.relationship('Car', backref='tyres')
    desc = db.Column(db.String(50))

src/f/l/Flask-User-HEAD/example_apps/minimal_app.py   Flask-User(Download)
class User(db.Model, UserMixin):
    id = db.Column(db.Integer, primary_key=True)
    active = db.Column(db.Boolean(), nullable=False, default=False)
    email = db.Column(db.String(255), nullable=False, unique=True)
    password = db.Column(db.String(255), nullable=False, default='')

src/f/l/flask-admin-HEAD/examples/sqla/simple.py   flask-admin(Download)
class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    first_name = db.Column(db.String(100))
    last_name = db.Column(db.String(100))
    username = db.Column(db.String(80), unique=True)
    email = db.Column(db.String(120), unique=True)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next