-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviews_audi.py
42 lines (36 loc) · 1.09 KB
/
views_audi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from django.http import HttpResponse, HttpRequest, HttpResponseRedirect
from django.shortcuts import render
orders = []
cars = [
{
"id": 1,
"available": 16,
"model": "A6",
"image": "https://thumb.tildacdn.com/tild3836-3936-4134-a433-353663656330/-/resize/260x/-/format/webp/2019.png",
},
{
"id": 2,
"available": 14,
"model": "A7",
"image": "https://thumb.tildacdn.com/tild3962-6335-4139-b962-386636356338/-/resize/260x/-/format/webp/2019.png",
},
{
"id": 3,
"available": 12,
"model": "A8",
"image": "https://thumb.tildacdn.com/tild3764-6131-4966-b237-393635633965/-/resize/260x/-/format/webp/2019.png",
},
{
"id": 4,
"available": 8,
"model": "Q3",
"image": "https://thumb.tildacdn.com/tild3032-6439-4663-b965-633332653537/-/resize/260x/-/format/webp/2019.png",
},
]
def audi(request: HttpRequest) -> HttpResponse:
global cars
context = {
"cars": cars,
"name": "Timur",
}
return render(request, "cars.html", context)