This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, url_for | |
| app = Flask(__name__, host_matching=True, static_host='app1.local:5000') | |
| @app.route('/', host='app1.local:5000') | |
| def home1(): | |
| return url_for('home1') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, Blueprint, url_for | |
| app = Flask(__name__) | |
| app.config['SERVER_NAME'] = 'app.local:5000' | |
| bp1 = Blueprint('bp1', __name__, subdomain='app1') | |
| bp2 = Blueprint('bp2', __name__, subdomain='app2') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # With help from : https://github.com/jonbiemond | |
| # | |
| # requires: | |
| # pip install flask flask_sqlalchemy | |
| # | |
| # run: flask --app sqlalchemy_to_josnable_dict.py init-db | |
| # run: flask --app sqlalchemy_to_josnable_dict.py test-data | |
| # run: flask --app sqlalchemy_to_josnable_dict.py get-user1 | |
| # run: flask --app sqlalchemy_to_josnable_dict.py get-user2 |
OlderNewer