Browse Source

adding application_root to post form in the start screen

pull/30/head
manetta 3 years ago
parent
commit
4d6c97fb46
  1. 2
      octomode.py
  2. 2
      templates/start.html

2
octomode.py

@ -110,7 +110,7 @@ def index():
create_pad_on_first_run(name, ext) create_pad_on_first_run(name, ext)
return redirect(url_for('pad', name=name)) return redirect(url_for('pad', name=name))
else: else:
return render_template('start.html') return render_template('start.html', application_root=APP.config['APPLICATION_ROOT'])
@APP.route('/<name>/') @APP.route('/<name>/')
def main(name): def main(name):

2
templates/start.html

@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='main.css') }}"> <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='main.css') }}">
</head> </head>
<body class="start-page"> <body class="start-page">
<form action="/" method="POST"> <form action="{{ application_root }}" method="POST">
<h1><input type="submit" value="open"> <input type="text" name="name"> <em class="octomode">in octomode</em></h1> <h1><input type="submit" value="open"> <input type="text" name="name"> <em class="octomode">in octomode</em></h1>
</form> </form>
</body> </body>

Loading…
Cancel
Save