整理文件夹及架构,加入打印机页面,octo反代有问题
This commit is contained in:
@@ -22,7 +22,7 @@ i18n_dict = {}
|
||||
|
||||
def load_i18n(app):
|
||||
global i18n_dict
|
||||
i18n_dir = os.path.join(app.root_path, '..', 'assets', 'i18n')
|
||||
i18n_dir = os.path.join(app.root_path, 'assets', 'i18n')
|
||||
if os.path.exists(i18n_dir):
|
||||
for f in os.listdir(i18n_dir):
|
||||
if f.endswith('.json'):
|
||||
@@ -50,9 +50,9 @@ def _t(key):
|
||||
return key # fallback to the key itself
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__, static_url_path='/assets', static_folder='../assets')
|
||||
app = Flask(__name__, static_url_path='/assets', static_folder='assets')
|
||||
app.config['SECRET_KEY'] = 'your-secret-key-change-it-in-production'
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///aio_3d.db'
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///../instance/aio_3d.db'
|
||||
app.config['SQLALCHEMY_ENGINE_OPTIONS'] = {'connect_args': {'timeout': 15}}
|
||||
app.config['UPLOAD_FOLDER'] = os.path.abspath(os.path.join(app.root_path, '..', 'uploads'))
|
||||
|
||||
@@ -74,8 +74,10 @@ def create_app():
|
||||
from . import models
|
||||
db.create_all()
|
||||
|
||||
from .routes import main_bp, auth_bp, admin_bp
|
||||
from .printer_routes import printer_bp
|
||||
from .routes.main_routes import main_bp
|
||||
from .routes.auth_routes import auth_bp
|
||||
from .routes.admin_routes import admin_bp
|
||||
from .routes.printer_routes import printer_bp
|
||||
app.register_blueprint(main_bp)
|
||||
app.register_blueprint(auth_bp)
|
||||
app.register_blueprint(admin_bp)
|
||||
|
||||
Reference in New Issue
Block a user