From 6a21f84172f3c94a269c7c990adf1610da68cbc8 Mon Sep 17 00:00:00 2001 From: ackFromRedmi Date: Sat, 24 Jan 2026 22:34:06 +0300 Subject: [PATCH] out env --- products/templates/products/list.html | 8 +++++++- products/views.py | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/products/templates/products/list.html b/products/templates/products/list.html index 593c14d..36747cf 100644 --- a/products/templates/products/list.html +++ b/products/templates/products/list.html @@ -16,7 +16,13 @@

Этот билд был собран и развернут автоматически через Gitea Actions.

Да еще и с работы.

Время деплоя: 21.01.2026 + + +

+ ENV_TYPE: {{ env_type }} +

+

Список товаров

Перейти в панельку админа
@@ -36,4 +42,4 @@

Товаров пока нет.

{% endfor %} - \ No newline at end of file + diff --git a/products/views.py b/products/views.py index 5ba0d4b..c18c187 100644 --- a/products/views.py +++ b/products/views.py @@ -1,6 +1,11 @@ +import os from django.shortcuts import render from .models import Product def product_list(request): items = Product.objects.all() - return render(request, 'products/list.html', {'products': items}) \ No newline at end of file + env_type = os.getenv("ENV_TYPE", "undefined") + return render(request, 'products/list.html', { + 'products': items, + 'env_type': env_type + })