9
0
mirror of https://github.com/donlon/cloudflare-error-page.git synced 2025-12-19 14:59:28 +00:00

rearrange Python files

This commit is contained in:
Anthony Donlon
2025-11-20 10:10:14 +08:00
parent a2bfc28b08
commit f3dec7ceec
4 changed files with 5 additions and 5 deletions

View File

@@ -132,7 +132,7 @@ params = {
### Using Flask server
See [flask_server.py](examples/flask_server.py) for embedding the error pages into the server
See [flask_demo.py](examples/flask_demo.py) for embedding the error pages into the server
## Full Parameter Reference

View File

@@ -57,7 +57,7 @@ def create_app(test_config=None) -> Flask:
from . import models
from . import examples
from . import editor
from . import shared
from . import share
if app.config["SQLALCHEMY_DATABASE_URI"].startswith('sqlite'):
app.config["SQLALCHEMY_ENGINE_OPTIONS"] = {
@@ -83,7 +83,7 @@ def create_app(test_config=None) -> Flask:
app.register_blueprint(editor.bp, url_prefix=f'{url_prefix}/editor')
app.register_blueprint(examples.bp, url_prefix=f'{url_prefix}/examples')
app.register_blueprint(shared.bp, url_prefix=f'{url_prefix}/s')
app.register_blueprint(share.bp, url_prefix=f'{url_prefix}/s')
return app

View File

@@ -19,7 +19,7 @@ from . import models
# root_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../')
# examples_dir = os.path.join(root_dir, 'examples')
bp = Blueprint('shared', __name__, url_prefix='/')
bp = Blueprint('share', __name__, url_prefix='/')
rand_charset = string.ascii_letters + string.digits
@@ -50,7 +50,7 @@ def create():
return jsonify({
'status': 'ok',
'name': item.name,
'url': request.host_url[:-1] + url_for('shared.get', name=item.name),
'url': request.host_url[:-1] + url_for('share.get', name=item.name),
# TODO: better way to handle this
})