18/08/25
This commit is contained in:
26
app.py
Normal file
26
app.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from flask import Flask, render_template, request
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
def ind():
|
||||
return render_template('index.html')
|
||||
|
||||
|
||||
@app.route("/process", methods=['GET', 'POST'])
|
||||
def prcs():
|
||||
if request.method == 'POST':
|
||||
tel = request.form['tel']
|
||||
tg = request.form['tg']
|
||||
i = request.form.get('radio12')
|
||||
if i == 'link':
|
||||
urlOrText = request.form.get('linkI')
|
||||
elif i == 'text':
|
||||
urlOrText = request.form.get('textI')
|
||||
else:
|
||||
urlOrText = '0'
|
||||
print(tel, tg, urlOrText)
|
||||
return render_template('index.html')
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
Reference in New Issue
Block a user