mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-05-14 14:22:16 +00:00
Revert back to Postgres database
This commit is contained in:
parent
c68c2954a5
commit
7cdb22984b
3 changed files with 7 additions and 6 deletions
|
@ -6,14 +6,15 @@ from werkzeug.exceptions import HTTPException
|
||||||
|
|
||||||
from server.extensions import db, migrate, cache, assets, login_manager
|
from server.extensions import db, migrate, cache, assets, login_manager
|
||||||
from server.models import Users
|
from server.models import Users
|
||||||
|
from server.config import MIGRATION_DIR, INSTANCE_DIR
|
||||||
from server import views, auth, api
|
from server import views, auth, api
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__, instance_path=INSTANCE_DIR)
|
||||||
app.config.from_pyfile("config.py")
|
app.config.from_pyfile("config.py")
|
||||||
|
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
migrate.init_app(app, db)
|
migrate.init_app(app, db, directory=MIGRATION_DIR)
|
||||||
|
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
db.create_all()
|
db.create_all()
|
||||||
|
|
|
@ -10,7 +10,6 @@ USER_MAX_TOKENS = 3
|
||||||
MAX_TOP_SCORES = 15
|
MAX_TOP_SCORES = 15
|
||||||
MAX_SEARCH_RESULTS = 5
|
MAX_SEARCH_RESULTS = 5
|
||||||
|
|
||||||
"""
|
|
||||||
# Postgres
|
# Postgres
|
||||||
SECRET_KEY = os.getenv("FLASK_KEY")
|
SECRET_KEY = os.getenv("FLASK_KEY")
|
||||||
|
|
||||||
|
@ -25,8 +24,9 @@ SQLALCHEMY_POOL_RECYCLE = 621
|
||||||
|
|
||||||
MIGRATION_DIR = "/data/storage/migrations"
|
MIGRATION_DIR = "/data/storage/migrations"
|
||||||
INSTANCE_DIR = "/data/storage/instance"
|
INSTANCE_DIR = "/data/storage/instance"
|
||||||
"""
|
|
||||||
|
|
||||||
|
"""
|
||||||
# SQLite
|
# SQLite
|
||||||
SECRET_KEY = "dev"
|
SECRET_KEY = "dev"
|
||||||
SQLALCHEMY_DATABASE_URI = "sqlite:///tfr.db"
|
SQLALCHEMY_DATABASE_URI = "sqlite:///tfr.db"
|
||||||
|
"""
|
|
@ -80,12 +80,12 @@ body
|
||||||
> th
|
> th
|
||||||
padding: 0.5rem
|
padding: 0.5rem
|
||||||
background-image: linear-gradient(to bottom, RGBA($white, 0.05), transparent)
|
background-image: linear-gradient(to bottom, RGBA($white, 0.05), transparent)
|
||||||
text-align: left
|
text-align: center
|
||||||
font-weight: bolder
|
font-weight: bolder
|
||||||
|
|
||||||
> td
|
> td
|
||||||
padding: 0.5rem
|
padding: 0.5rem
|
||||||
text-align: left
|
text-align: center
|
||||||
|
|
||||||
&.player
|
&.player
|
||||||
color: RGB($secondary)
|
color: RGB($secondary)
|
||||||
|
|
Loading…
Add table
Reference in a new issue