update : 14.11.2024 13:38:25,21

This commit is contained in:
Sabron 2024-11-14 13:38:25 +07:00
parent 01d2a5389f
commit b62a62183c
2 changed files with 9 additions and 3 deletions

View File

@ -40,7 +40,10 @@ from apps.gto.models.model_indicators import Indicators
def update_object(request):
try:
if request.method == "POST":
object_list = Equipment.objects.all()
date_start = datetime.now()- timedelta(days=1)
my_filter = Q(block=False)
my_filter &= Q(time__gte=date_start)
object_list = Equipment.objects.filter(my_filter).all()
m_list = []
for obj in object_list:
m_list.append({
@ -249,7 +252,10 @@ def main_index(request):
mylat = str(float(settingsmodule.get_settings('latitude', '55.344251210827814'))) # широта
param = request.GET.dict()
clients = Equipment.objects.filter(block=False).order_by("-time", 'name').all()
date_start = datetime.now()- timedelta(days=1)
my_filter = Q(block=False)
my_filter &= Q(time__gte=date_start)
clients = Equipment.objects.filter(my_filter).order_by("-time", 'name').all()
clients_count = clients.count()
paginator = Paginator(clients, 50)
page_number = request.GET.get('page', 1)

View File

@ -40,7 +40,7 @@ INSTALLED_APPS = [
"""Информация о приложении """
SITE_TITLE = u'Многофункциональная система безопасности ОГР'
SITE_TITLE_S = u'МФСБ ОГР'
APP_VER = u'1.0.05.1'
APP_VER = u'1.0.05.2'
APP_VEK = u'2023 - 2024гг'
APP_COPPIRIGHT = u'Многофункциональная система безопасности ОГР'