Add web component.
This commit is contained in:
parent
f0c3fb1fea
commit
d839ae4f10
|
@ -0,0 +1,20 @@
|
|||
#!flask/bin/python
|
||||
from flask import Flask, request, render_template
|
||||
import os
|
||||
import subprocess
|
||||
import re
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def my_form():
|
||||
return render_template('my-form.html')
|
||||
|
||||
@app.route('/', methods=['POST'])
|
||||
def form_post():
|
||||
command = "python apol-choice.py"
|
||||
topics = subprocess.check_output(command, shell=True)
|
||||
return topics
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host= '0.0.0.0')
|
|
@ -0,0 +1,11 @@
|
|||
</br>
|
||||
<p>Hit the Button For Random Apol Topics</p>
|
||||
<form method="POST">
|
||||
<input name="secret" type="submit" value="Apol Topics">
|
||||
</form>
|
||||
<!--</br>
|
||||
<p>And your shift in this box. Then hit "shift" when you are ready.</p>
|
||||
<form method="POST">
|
||||
<input name="shift">
|
||||
<input type="submit" value="Shift">
|
||||
</form>-->
|
Loading…
Reference in New Issue