mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-07-06 12:43:18 +00:00
Only reveal hashids to the ui
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user