Skip to content

Commit ec7d783

Browse files
Consertando cancelar transporte
1 parent 3cedaff commit ec7d783

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

setup/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
urlpatterns = [
66
path("admin/", admin.site.urls),
7-
path("", RedirectView.as_view(url="/auth/login/", permanent=True)),
7+
path("", RedirectView.as_view(url="/pacientes/", permanent=True)),
88
path("transportes/", include("transportes.urls")),
99
path("pacientes/", include("pacientes.urls")),
1010
path("condicoes/", include("condicoes.urls")),

transportes/templates/cancelar_transporte.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
{% extends "base.html" %} {% load static poll_extras_transportes %} {% block css
2-
%}
1+
{% extends "base.html" %} {% load static poll_extras_transportes %} {% block css %}
32
<link rel="stylesheet" type="text/css" href="{% static 'css/list.css' %}" />
4-
{% endblock css %} {% block title %} Excluir Transporte {% endblock title %} {%
5-
block content %}
3+
{% endblock css %} {% block title %} Excluir Transporte {% endblock title %}
4+
{% block content %}
65
<form
76
action="{% url 'cancelar_transporte' id %}"
87
method="post"

transportes/templates/paciente_transportes.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ <h3>{{ nome }}</h3>
3131
Editar
3232
</td>
3333
<td class="td-align-center"">
34-
<!-- <a href=" {% url 'concelar_transporte' transporte.id %}">Cancelar</a>
35-
-->
34+
<a href=" {% url 'concelar_transporte' transporte.id %}">Cancelar</a>
3635
Cancelar
3736
</td>
3837
<td class="td-align-center"">

transportes/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def cancelar(request, id):
137137

138138
if request.method == "GET":
139139

140-
return render(request, "cancelar_transporte.html", {"id": transporte.pk})
140+
return render(request, "cancelar_transporte.html", {"id": id})
141141

142142
TransporteCore().validar_cancelamento(
143143
datetime.combine(

0 commit comments

Comments
 (0)