@ -34,7 +34,7 @@ pawel['score'] = 10
leaderboard . append ( pawel )
leaderboard . append ( pawel )
mark = { }
mark = { }
mark [ ' name ' ] = ' Mar k'
mark [ ' name ' ] = ' Mar e k'
mark [ ' score ' ] = 1
mark [ ' score ' ] = 1
leaderboard . append ( mark )
leaderboard . append ( mark )
@ -50,9 +50,9 @@ leaderboard.append(wille)
c_davide = { }
c_davide = { }
c_davide [ ' name ' ] = ' Davide '
c_davide [ ' name ' ] = ' Davide '
c_davide [ ' confirmed ' ] = ' yes '
c_davide [ ' confirmed ' ] = ' no '
cook = c_davide
cook = c_davide
eaters = [ " Pawel " , " Mar k" , " Sven " ]
eaters = [ " Wille " , " Mar e k" , " Sven " ]
# flask-login
# flask-login
login_manager = LoginManager ( )
login_manager = LoginManager ( )
@ -62,7 +62,12 @@ login_manager.login_view = "login"
@app.route ( " / " )
@app.route ( " / " )
@login_required
@login_required
def index ( ) :
def index ( ) :
return render_template ( ' index.html ' , leaderboard = leaderboard , cook = cook , eaters = eaters )
date = ' Friday 23rd of November '
meals = [ ]
meals . append ( { ' id ' : 1 , ' kuk ' : ' davide ' , ' eaters ' : [ ' marek ' , ' sven ' , ' wille ' ] , ' flavor_text ' : ' Pizza ' , ' date ' : ' Tuesday 21st of November ' , ' selection_deadline ' : ' 23 hours 14 minutes ' , ' status ' : 0 } )
meals . append ( { ' id ' : 2 , ' kuk ' : ' marek ' , ' eaters ' : [ ' davide ' , ' sven ' , ' david ' , ' wille ' ] , ' flavor_text ' : ' Grzybowa ' , ' date ' : ' Friday 23rd of November ' , ' selection_deadline ' : ' 3 Days 23 hours ' , ' status ' : 0 } )
return render_template ( ' index.html ' , leaderboard = leaderboard , cook = cook , eaters = eaters , date = date )
# return render_template('meal_list.html', leaderboard=leaderboard, cook=cook, eaters=eaters, meals=meals)
# somewhere to login
# somewhere to login
@app.route ( " /login " , methods = [ " GET " , " POST " ] )
@app.route ( " /login " , methods = [ " GET " , " POST " ] )