예제 #1
0
class DjangoContentType(db.Model):
    app_label = db.CharField(max_length=100)
    model = db.CharField(max_length=100)

    class Meta:
        managed = False
        db_table = 'django_content_type'
        unique_together = (('app_label', 'model'), )
예제 #2
0
class DjangoMigrations(db.Model):
    app = db.CharField(max_length=255)
    name = db.CharField(max_length=255)
    applied = db.DateTimeField()

    class Meta:
        managed = False
        db_table = 'django_migrations'
예제 #3
0
class AuthPermission(db.Model):
    name = db.CharField(max_length=255)
    content_type = db.ForeignKey('DjangoContentType', db.DO_NOTHING)
    codename = db.CharField(max_length=100)

    class Meta:
        managed = False
        db_table = 'auth_permission'
        unique_together = (('content_type', 'codename'), )
예제 #4
0
class Questionbank(db.model):
    tablename = "Questionbank"
    id = db.Column(db.Integer, primary_key = True)
    questions = db.Column(db.String, nullable=False)
    answers = db.Column(db.String, nullable=False)
    testbank = db.relationship("Questionbank", backref="Testbank", lazy=True)
    question_owner = db.CharField(max_length=30)
    question_type = db.CharField(max_length=30)
    question_id = db.CharField(max_length=30)
    testbank = db.relationship("Testbank", backref="Questionbank", lazy = true)
    def add_Testbank(id, question, answer, author, question_id)
예제 #5
0
class UsersEmailuser(db.Model):
    password = db.CharField(max_length=128)
    last_login = db.DateTimeField(blank=True, null=True)
    is_superuser = db.BooleanField()
    first_name = db.CharField(max_length=30)
    last_name = db.CharField(max_length=30)
    email = db.CharField(unique=True, max_length=254)
    is_staff = db.BooleanField()
    is_active = db.BooleanField()
    date_joined = db.DateTimeField()
    last_updated = db.DateTimeField()

    class Meta:
        managed = False
        db_table = 'users_emailuser'
예제 #6
0
class DjangoSession(db.Model):
    session_key = db.CharField(primary_key=True, max_length=40)
    session_data = db.TextField()
    expire_date = db.DateTimeField()

    class Meta:
        managed = False
        db_table = 'django_session'
예제 #7
0
class DjangoAdminLog(db.Model):
    action_time = db.DateTimeField()
    object_id = db.TextField(blank=True, null=True)
    object_repr = db.CharField(max_length=200)
    action_flag = db.SmallIntegerField()
    change_message = db.TextField()
    content_type = db.ForeignKey('DjangoContentType',
                                 db.DO_NOTHING,
                                 blank=True,
                                 null=True)
    user = db.ForeignKey('UsersEmailuser', db.DO_NOTHING)

    class Meta:
        managed = False
        db_table = 'django_admin_log'
예제 #8
0
class AuthGroup(db.Model):
    name = db.CharField(unique=True, max_length=80)

    class Meta:
        managed = False
        db_table = 'auth_group'
예제 #9
0
class AlembicVersion(db.Model):
    version_num = db.CharField(primary_key=True, max_length=32)

    class Meta:
        managed = False
        db_table = 'alembic_version'