modified: app.py
This commit is contained in:
10
app.py
10
app.py
@@ -68,5 +68,15 @@ def quiz(playlist_id):
|
||||
track = random.choice(tracks)
|
||||
return render_template("quiz.html", track=track)
|
||||
|
||||
@app.route('/logout')
|
||||
def logout():
|
||||
session.pop('user', None)
|
||||
return redirect(url_for('index'))
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
user = session.get('user') # Benutzerinfos aus der Session holen, falls vorhanden
|
||||
return render_template('index.html', user=user)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
|
||||
Reference in New Issue
Block a user