You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
607 B
28 lines
607 B
from flask import Flask,render_template
|
|
|
|
|
|
app = Flask(__name__)
|
|
zaehler = 0
|
|
@app.route('/')
|
|
|
|
def index():
|
|
global zaehler
|
|
zaehler=zaehler +1
|
|
return render_template('index.html', counter=zaehler)
|
|
|
|
schueler = [
|
|
{'name':'Simpson','vorname': 'Bart'},
|
|
{'name':'Simpson','vorname':'Lisa'},
|
|
{'name':'van Houten','vorname':'Milhouse'},
|
|
{'name':'Wiggum','vorname':'Ralph'},
|
|
{'name':'Jones','vorname':'Jimbo'}
|
|
]
|
|
|
|
@app.route('/students')
|
|
def students():
|
|
return render_template('students.html',schueler=schueler)
|
|
|
|
if __name__ == '__main__':
|
|
app.run(host='0.0.0.0',port=8085, debug=True)
|
|
|
|
|
|
|