Files
flask-beertap/beertap/views.py

26 lines
690 B
Python

import json
from flask import Blueprint, render_template, request, flash, jsonify
views = Blueprint('views', __name__)
@views.route('/', methods=['GET'])
def render():
return render_template('beertap.html')
@views.route('/', methods=['POST'])
def choice():
if request.form['submit_button'] == 'option_1':
print("Es Grosses uselah!")
if request.form['submit_button'] == 'option_2':
print("Es Chliises uselah!")
return render_template('beertap.html')
@views.route('/about', methods=['GET'])
def about():
return render_template('about.html')
@views.route('/statistics', methods=['GET'])
def statistics():
return render_template('statistics.html')