Разграничение прав на использование разделов

This commit is contained in:
Anton Kamalov
2024-10-25 11:37:41 +03:00
parent f708df717c
commit 36688b318d
8 changed files with 39 additions and 17 deletions

View File

@@ -2,10 +2,16 @@ from flask import Flask, render_template, session
from Requests.requests import requests_bp
from Auth.auth import auth_bp
from checker import check_auth
import os, json
app = Flask(__name__)
app.secret_key = 'suplex'
with open(os.path.join(os.path.dirname(__file__), 'data/db_access.json')) as f:
app.config['db_access'] = json.load(f)
with open(os.path.join(os.path.dirname(__file__), 'data/config.json')) as f:
app.config['db_config'] = json.load(f)
app.register_blueprint(requests_bp, url_prefix='/requests')
app.register_blueprint(auth_bp, url_prefix='/auth')