Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Oct 19, 2024
1 parent b92cfde commit 649ea30
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion web/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from flask import Flask, abort, request, current_app, session, url_for
from werkzeug.local import LocalProxy
from flask import Blueprint, render_template

from flask import render_template_string
import setting

socketio = SocketIO(manage_session=False, async_mode='threading',
Expand Down Expand Up @@ -44,6 +44,18 @@
app.logger.debug("Python syspath: %s", sys.path)


@app.after_request
def requestAfter(response):
response.headers['soft'] = setting.APP_NAME
response.headers['mw-version'] = setting.APP_VERSION
return response


@app.errorhandler(404)
def page_unauthorized(error):
return render_template_string('404 not found', error_info=error), 404


# def create_app(app_name = None):
#
# if not app_name:
Expand Down

0 comments on commit 649ea30

Please sign in to comment.