Only reveal hashids to the ui

This commit is contained in:
Patrick Jentsch
2021-11-30 16:22:16 +01:00
parent 3e227dc4cf
commit 72ba61f369
39 changed files with 1098 additions and 1083 deletions

View File

@ -6,11 +6,13 @@ from flask_migrate import Migrate
from flask_paranoid import Paranoid
from flask_socketio import SocketIO
from flask_sqlalchemy import SQLAlchemy
from hashids import Hashids
import flask_assets
assets = flask_assets.Environment()
db = SQLAlchemy()
hashids = Hashids(min_length=32) # , salt=current_app.config.get('SECRET_KEY')
login = LoginManager()
login.login_view = 'auth.login'
login.login_message = 'Please log in to access this page.'
@ -37,6 +39,9 @@ def create_app(config_class=Config):
message_queue=app.config.get('NOPAQUE_SOCKETIO_MESSAGE_QUEUE_URI')
)
from .utils import HashidConverter
app.url_map.converters['hashid'] = HashidConverter
from .events import socketio as socketio_events
from .events import sqlalchemy as sqlalchemy_events