Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- view = Flask(__name__, static_url_path=‘/subdir/static',static_folder='static')
- view.add_url_rule('/static/<filename>', 'static')
- print(view.url_map)
- ## Map([<Rule '/subdir/static/<filename>' (GET, HEAD, OPTIONS) -> static>,
- ## <Rule '/static/<filename>' (GET, HEAD, OPTIONS) -> static>])
- view = Flask(__name__)
- static_url = Blueprint('static_url', __name__, url_prefix='/subdir/', static_folder='static')
- view.register_blueprint(static_url)
Add Comment
Please, Sign In to add comment