29 lines
858 B
Python
29 lines
858 B
Python
from django.http import HttpResponse
|
|
from django.http import FileResponse
|
|
from django.shortcuts import render
|
|
from django.views import generic
|
|
from django.template import loader
|
|
from django.views.decorators.clickjacking import xframe_options_exempt
|
|
|
|
from vehicles.models import *
|
|
|
|
@xframe_options_exempt
|
|
def view_vhc(request):
|
|
template = loader.get_template("vhc/vhc.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))
|
|
|
|
@xframe_options_exempt
|
|
def view_peremptions(request):
|
|
template = loader.get_template("vhc/peremptions.html")
|
|
a_vhc = Vehicles.objects.all().order_by("nOrder")
|
|
context = {'list_vhc': a_vhc}
|
|
print("passs 1 ligne 12")
|
|
|
|
|
|
return HttpResponse(template.render(context,request))
|