tla / stemmaweb

Catalyst interface and online tools for stemmatology research
13 stars 9 forks source link

Simplify wildcard route catching #124

Closed peter-gy closed 1 year ago

peter-gy commented 1 year ago

Flask supports catching wildcard routes through the following syntax:

@test.route("/vacation/<path:filename>")
def vacation(filename):
    return send_file(filename)

Source: https://www.reddit.com/r/flask/comments/6ppkd6/dynamic_or_wildcard_routing/

The current, unnecessarily complex approach of generating URL Rules dynamically should be replaced in favor of this approach. Should rework ea9dce23942baafe6d309633aef75b3df959b257, introduced in #105.

peter-gy commented 1 year ago

Closed by #125