19 lines
506 B
Python
19 lines
506 B
Python
|
|
from flask import Flask, render_template, request, redirect, url_for
|
||
|
|
|
||
|
|
app = Flask(__name__)
|
||
|
|
|
||
|
|
@app.route('/')
|
||
|
|
def home():
|
||
|
|
return render_template('index.html')
|
||
|
|
|
||
|
|
@app.route('/kontakt', methods=['GET', 'POST'])
|
||
|
|
def kontakt():
|
||
|
|
if request.method == 'POST':
|
||
|
|
name = request.form['name']
|
||
|
|
nachricht = request.form['nachricht']
|
||
|
|
return render_template('thankyou.html', name=name)
|
||
|
|
return render_template('contact.html')
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
app.run(debug=True, port=5000)
|