forgot to remove the old endpoint

This commit is contained in:
mcbloch 2019-09-05 03:25:17 +02:00
parent e660627249
commit f59ec75bea
No known key found for this signature in database
GPG key ID: CE32A7D95B7D6418

View file

@ -65,26 +65,3 @@ def favicon():
return send_from_directory(os.path.join(app.root_path, 'static'), return send_from_directory(os.path.join(app.root_path, 'static'),
'favicon_orange.ico', 'favicon_orange.ico',
mimetype='image/x-icon') mimetype='image/x-icon')
@general_bp.route('/routes')
@login_required
def list_routes():
import urllib
output = []
for rule in app.url_map.iter_rules():
options = {}
for arg in rule.arguments:
options[arg] = "[{0}]".format(arg)
print(rule.endpoint)
methods = ','.join(rule.methods)
url = url_for(rule.endpoint, **options)
line = urllib.parse.unquote("{:50s} {:20s} {}".format(
rule.endpoint, methods, url))
output.append(line)
string = ''
for line in sorted(output):
string += line + "<br/>"
return string