Last active
July 26, 2018 12:24
-
-
Save walison17/8f968e3784b8d30bee8f9030b3ccf1b2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <div class="row"> | |
| <table> | |
| <tbody> | |
| {% for reserva in reservas %} | |
| <tr> | |
| <td>{{ reserva.user.first_name }}</td> | |
| <td>{{ reserva.data }}</td> | |
| <td>{{ reserva.turno }}</td> | |
| <td>{{ reserva.equipamento_reservado.id }}</td> | |
| </tr> | |
| {% endfor %} | |
| </tbody> | |
| </table> | |
| </div> | |
| <a href="{% url 'reservar' equipamento.id %}">Nova Reserva</a> |
This file contains hidden or 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
| def visualizar(request, id): | |
| equipamento = get_object_or_404(Equipamento, pk=id) | |
| reservas = Reserva.objects.filter(equipamento_reservado=equipamento) | |
| return render(request, 'reserva_datas.html', {'equipamento: equipamento, 'reservas':reservas}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment