-
-
Save parzibyte/ac6bb6ba8f2be3de29e88d8df54434cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "maestra.html" %} | |
{% block titulo %} Juegos {% endblock %} | |
{% block contenido %} | |
<section class="section"> | |
<div class="columns"> | |
<div class="column"> | |
<h3 class="is-size-3">Juegos</h3> | |
<a href="{{url_for('formulario_agregar_juego')}}" class="button is-success">Agregar</a> | |
<table class="table"> | |
<thead> | |
<tr> | |
<th>Nombre</th> | |
<th>Descripción</th> | |
<th>Precio</th> | |
<th>Editar</th> | |
<th>Eliminar</th> | |
</tr> | |
</thead> | |
<tbody> | |
{% for juego in juegos %} | |
<tr> | |
<td>{{juego[1]}}</td> | |
<td>{{juego[2]}}</td> | |
<td>{{juego[3]}}</td> | |
<td> | |
{# Pasar el id (lo que hay en juego[0] #} | |
<a href="{{url_for('editar_juego', id=juego[0])}}" class="button is-info">Editar</a> | |
</td> | |
<td> | |
<form action="{{url_for('eliminar_juego')}}" method="POST"> | |
<input type="hidden" name="id" value="{{juego[0]}}"> | |
<button class="button is-danger">Eliminar</button> | |
</form> | |
</td> | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
</div> | |
</div> | |
</section> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment