Ajout page péremptions
This commit is contained in:
56
vehicles/templates/vhc/peremptions.html
Normal file
56
vehicles/templates/vhc/peremptions.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
{% load static %}
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="{% static 'vehicles/style.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="main_container">
|
||||
{% for vhc in list_vhc %}
|
||||
{% with 'vehicles/images/ocvs_rtw_'|add:vhc.nStatus|add:'.png' as image_static %}
|
||||
<div class="child">
|
||||
<div style="height: 25%;display: flex;padding-top: 10px;" >
|
||||
<a href="/admin/vehicles/vehicles/{{vhc.id}}/change/" target="_blank" style="font-weight: bold;">{{vhc.sName}}</a><br>
|
||||
|
||||
<img height="100px" src="{% static image_static %}" ><br>
|
||||
{% if vhc.bLucas %}
|
||||
<span style="align-self: flex-end; padding: 20px;color:orange">Lucas</span>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="child_box" style="height: 70%;">
|
||||
|
||||
<div style="width: 350px;height: var(--main-child-container-height); ">
|
||||
<b>Péremptions</b>
|
||||
<div class="child_box">
|
||||
|
||||
<div style="width: 350px;margin-top: 15px">
|
||||
{% for info in vhc.get_all_infos_perempt_perma %}
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="_blank">{{info.sDesc}}</a><br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div style="width: 350px;margin-top: 15px">
|
||||
{% for info in vhc.get_all_infos_perempt %}
|
||||
<a href="/admin/vehicles/vehicles_infos/{{info.id}}" target="_blank">{{info.sDesc}}</a> <br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -8,6 +8,7 @@ from . import views
|
||||
app_name = "vehicles"
|
||||
urlpatterns = [
|
||||
path('vhc', views.view_vhc, name='view_vhc'),
|
||||
path('peremptions', views.view_peremptions, name='view_peremptions'),
|
||||
|
||||
|
||||
|
||||
|
@@ -15,4 +15,14 @@ def view_vhc(request):
|
||||
print("passs 1 ligne 12")
|
||||
|
||||
|
||||
return HttpResponse(template.render(context,request))
|
||||
|
||||
@xframe_options_exempt
|
||||
def view_peremptions(request):
|
||||
template = loader.get_template("vhc/peremptions.html")
|
||||
a_vhc = Vehicles.objects.all().order_by("nStatus","nOrder")
|
||||
context = {'list_vhc': a_vhc}
|
||||
print("passs 1 ligne 12")
|
||||
|
||||
|
||||
return HttpResponse(template.render(context,request))
|
||||
|
Reference in New Issue
Block a user