co
This commit is contained in:
parent
54fcdb0b60
commit
c6130e4b52
2
.gitignore
vendored
2
.gitignore
vendored
@ -70,3 +70,5 @@ migrations/*
|
||||
.env
|
||||
.idea/*
|
||||
*.zip
|
||||
|
||||
modules/*
|
||||
|
@ -103,7 +103,7 @@ admin = Admin( # server,
|
||||
index_view=IndexView(menu_icon_type='fa',
|
||||
menu_icon_value='fa-home', ),
|
||||
name='PDMI',
|
||||
template_mode='bootstrap4-left',
|
||||
template_mode='bootstrap3',
|
||||
category_icon_classes={
|
||||
'Administration': 'fa fa-cogs',
|
||||
},
|
||||
|
@ -10,7 +10,7 @@ DEBUG = True # TODO
|
||||
# ======================================================================================================================
|
||||
# =================================================== sqlalchemy =======================================================
|
||||
# ======================================================================================================================
|
||||
SQLALCHEMY_DATABASE_URI = "mysql://"+os.environ["DATABASE_USER"]+":"+os.environ["DATABASE_PASSWORD"]+\
|
||||
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://"+os.environ["DATABASE_USER"]+":"+os.environ["DATABASE_PASSWORD"]+\
|
||||
"@"+os.environ["DATABASE_HOST"]+":"+os.environ["DATABASE_PORT"]+"/"\
|
||||
+os.environ["DATABASE_NAME"]
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
|
@ -25,7 +25,7 @@ class Roles(db.Model, RoleMixin):
|
||||
class Modules(db.Model):
|
||||
__tablename__ = "modules"
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
name = db.Column(db.String(400))
|
||||
name = db.Column(db.String(100))
|
||||
versions = db.relationship('ModuleVersions', backref='modules', lazy=True)
|
||||
|
||||
|
||||
@ -40,9 +40,9 @@ class Users(db.Model, UserMixin):
|
||||
__tablename__ = "users"
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
date_created = db.Column(db.DateTime, default=datetime.datetime.utcnow)
|
||||
username = db.Column(db.String(400))
|
||||
email = db.Column(db.String(400), unique=True)
|
||||
password = db.Column(db.String(400))
|
||||
username = db.Column(db.String(100))
|
||||
email = db.Column(db.String(100), unique=True)
|
||||
password = db.Column(db.String(200))
|
||||
active = db.Column(db.Boolean)
|
||||
roles = db.relationship('Roles', secondary=roles_users,
|
||||
backref=db.backref('users', lazy='dynamic'))
|
||||
|
Loading…
Reference in New Issue
Block a user