out env
All checks were successful
Auto-Deploy-Shop / deploy (push) Successful in 6s

This commit is contained in:
2026-01-24 22:34:06 +03:00
parent 19c30d4387
commit 6a21f84172
2 changed files with 13 additions and 2 deletions

View File

@@ -16,7 +16,13 @@
<p style="margin: 5px 0 0;">Этот билд был собран и развернут автоматически через Gitea Actions.</p> <p style="margin: 5px 0 0;">Этот билд был собран и развернут автоматически через Gitea Actions.</p>
<p style="margin: 5px 0 0;">Да еще и с работы.</p> <p style="margin: 5px 0 0;">Да еще и с работы.</p>
<small>Время деплоя: 21.01.2026</small> <small>Время деплоя: 21.01.2026</small>
<!-- 🔥 Вот здесь вывод переменной окружения -->
<p style="margin-top: 15px; font-size: 14px;">
<strong>ENV_TYPE:</strong> {{ env_type }}
</p>
</div> </div>
<h1>Список товаров</h1> <h1>Список товаров</h1>
<a href="/admin/" class="admin-link">Перейти в панельку админа</a> <a href="/admin/" class="admin-link">Перейти в панельку админа</a>
<hr> <hr>

View File

@@ -1,6 +1,11 @@
import os
from django.shortcuts import render from django.shortcuts import render
from .models import Product from .models import Product
def product_list(request): def product_list(request):
items = Product.objects.all() items = Product.objects.all()
return render(request, 'products/list.html', {'products': items}) env_type = os.getenv("ENV_TYPE", "undefined")
return render(request, 'products/list.html', {
'products': items,
'env_type': env_type
})