mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Switch to SQLAlchemy for database management
Add Favicon
This commit is contained in:
parent
9e87c74c96
commit
2e86bfa072
11 changed files with 341 additions and 192 deletions
|
@ -8,14 +8,12 @@ print("""
|
|||
Created by Fluffy Bean - Version 23.03.02
|
||||
""")
|
||||
|
||||
|
||||
from flask import Flask, render_template
|
||||
from flask_compress import Compress
|
||||
|
||||
from dotenv import load_dotenv
|
||||
import platformdirs
|
||||
|
||||
# Load logger
|
||||
from gallery.logger import logger
|
||||
logger.innit_logger()
|
||||
|
||||
|
@ -25,7 +23,7 @@ import os
|
|||
|
||||
# Check if any of the required files are missing
|
||||
if not os.path.exists(platformdirs.user_config_dir('onlylegs')):
|
||||
from setup import setup
|
||||
from .setup import setup
|
||||
setup()
|
||||
|
||||
|
||||
|
@ -78,14 +76,12 @@ def create_app(test_config=None):
|
|||
except OSError:
|
||||
pass
|
||||
|
||||
# Load database
|
||||
from . import db
|
||||
db.init_app(app)
|
||||
|
||||
# Load theme
|
||||
from . import sassy
|
||||
sassy.compile('default', app.root_path)
|
||||
|
||||
|
||||
@app.errorhandler(405)
|
||||
def method_not_allowed(e):
|
||||
error = '405'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue