Browse Source

rewriting redirects

pull/30/head
manetta 2 years ago
parent
commit
f7105a30bf
  1. 4
      octomode.py

4
octomode.py

@ -108,13 +108,13 @@ def index():
exts = ['.md', '.css']
for ext in exts:
create_pad_on_first_run(name, ext)
return redirect(url_for('pad', name=name))
return redirect(f'{ APP.config["APPLICATION_ROOT"] }{ name }/pad/')
else:
return render_template('start.html', application_root=APP.config["APPLICATION_ROOT"])
@APP.route('/<name>/')
def main(name):
return redirect(url_for('pad', name=name))
return redirect(f'{ APP.config["APPLICATION_ROOT"] }{ name }/pad/')
@APP.route('/<name>/pad/')
def pad(name):

Loading…
Cancel
Save