Browse Source

Lista los repostajes en la página index

politica
Celestino Rey 1 year ago
parent
commit
0311b639d7
2 changed files with 12 additions and 10 deletions
  1. BIN
      flask_crud/instance/students.db
  2. +12
    -10
      flask_crud/templates/index.html

BIN
flask_crud/instance/students.db View File


+ 12
- 10
flask_crud/templates/index.html View File

@ -1,21 +1,23 @@
{% extends "layout.html" %}
{% block content %}
<h1>Students List</h1>
<a href="{{ url_for('add_repostaje') }}" class="btn btn-primary">Add Student</a>
<h1>Lista de repostajes</h1>
<a href="{{ url_for('add_repostaje') }}" class="btn btn-primary">Añadir repostaje</a>
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Age</th>
<th>Grade</th>
<th>Actions</th>
<th>Fecha</th>
<th>Vehículo</th>
<th>Kilómetros</th>
<th>Litros</th>
<th>Descuento</th>
<th>Precio por litro</th>
<th>Importe</th>
</tr>
</thead>
<tbody>
{% for repostajes in repostajess %}
{% for repostajes in repostajes %}
<tr>
<td>{{ repostajes.identificador }}</td>
<td>{{ repostajes.fecha }}</td>
<td>{{ repostajes.vehiculo }}</td>
@ -25,8 +27,8 @@
<td>{{ repostajes.precioxlitro }}</td>
<td>{{ repostajes.importe }}</td>
<td>
<a href="{{ url_for('edit_record', id=repostajes.identificador) }}" class="btn btn-warning">Edit</a>
<a href="{{ url_for('delete_record', id=repostajes.identificador) }}" class="btn btn-danger">Delete</a>
<a href="{{ url_for('edit_repostaje', id=repostajes.identificador) }}" class="btn btn-warning">Edit</a>
<a href="{{ url_for('delete_repostaje', id=repostajes.identificador) }}" class="btn btn-danger">Delete</a>
</td>
</tr>
{% endfor %}


Loading…
Cancel
Save