Changed endpoint name

master
Davide Bongiovanni 6 years ago
parent 7441ee742b
commit 5f7b38b839

@ -130,9 +130,9 @@ def addme():
@app.route('/')
def index():
return render_template('meal_list.html', leaderboard=getLeaderboard(), meals=getUpcomingMeals(), now=datetime.datetime.now())
return render_template('meal_list.html', leaderboard=getLeaderboard(), meals=getUpcomingMeals())
@app.route('/view_meal')
@app.route('/viewmeal')
def view_meal():
meal_id = request.args.get('meal')
meal = getMeal(meal_id)

@ -41,7 +41,7 @@
{% if meal.needs_confirmation %}
<div class="flex-card" onclick="location.href='/verify?meal={{meal.id}}';" style="cursor: pointer; width: 60%; justify-content: space-between;">
{% else %}
<div class="flex-card" onclick="location.href='/view_meal?meal={{meal.id}}';" style="cursor: pointer; width: 60%; justify-content: space-between;">
<div class="flex-card" onclick="location.href='/viewmeal?meal={{meal.id}}';" style="cursor: pointer; width: 60%; justify-content: space-between;">
{% endif %}
<span{% if meal.needs_confirmation%} style="color: #EE7500;"{% endif %}><b>{{meal.meal_time}}</b></span>
<p style="text-align: left;">{% if meal.needs_confirmation %}Did &nbsp;{% endif %}{% if meal.kuk != "" %}<img class="flex-small-thumb" src="{{url_for('static', filename=meal.kuk + '.png')}}" title="{{meal.kuk}}" align="middle" style="margin: " /> &nbsp; {% if not meal.needs_confirmation %}<b>WILL</b>{% endif %}{% else %}<img class="flex-small-thumb" src="{{url_for('static', filename=meal.candidate + '.png')}}" title="{{meal.kuk}}" align="middle" style="margin: " /> &nbsp; {% if not meal.needs_confirmation %}<b>SHOULD</b>{% endif %}{% endif%} cook for <br>{% for e in meal.eaters %}<img class="flex-small-thumb" src="{{url_for('static', filename=e + '.png')}}" title="{{e}}" align="middle"/>&nbsp; {% endfor %}{% if meal.needs_confirmation %}<b>?</b>{% endif %}</p>

Loading…
Cancel
Save