большое обновление фронта

This commit is contained in:
2024-01-03 12:38:37 +03:00
parent 4c94a7271a
commit a1f86691a4
9 changed files with 333 additions and 200 deletions

View File

@@ -1,8 +1,30 @@
import os
from django.http import HttpResponse
from django.shortcuts import render
from django.db.models import Manager
# Create your views here.
# только для тестирования!
import requests
TEST_BASE_FETCH = "https://test.wawaa.ru/dev-fetch.php"
def view_index(request):
return render(request, 'index.html')
def view_stats(request):
# только для тестирования!
res = requests.get(TEST_BASE_FETCH + "?stats", headers={'Authorization': os.getenv("TEST_AUTH")})
response = HttpResponse(res.content)
response.headers["Content-type"] = response.headers["Content-type"]
return response
def view_tank_chart(request):
# только для тестирования!
res = requests.get(TEST_BASE_FETCH + "?tank_chart", headers={'Authorization': os.getenv("TEST_AUTH")})
response = HttpResponse(res.content)
response.headers["Content-type"] = response.headers["Content-type"]
return response