This commit is contained in:
@@ -16,7 +16,13 @@
|
||||
<p style="margin: 5px 0 0;">Этот билд был собран и развернут автоматически через Gitea Actions.</p>
|
||||
<p style="margin: 5px 0 0;">Да еще и с работы.</p>
|
||||
<small>Время деплоя: 21.01.2026</small>
|
||||
|
||||
<!-- 🔥 Вот здесь вывод переменной окружения -->
|
||||
<p style="margin-top: 15px; font-size: 14px;">
|
||||
<strong>ENV_TYPE:</strong> {{ env_type }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h1>Список товаров</h1>
|
||||
<a href="/admin/" class="admin-link">Перейти в панельку админа</a>
|
||||
<hr>
|
||||
@@ -36,4 +42,4 @@
|
||||
<p>Товаров пока нет.</p>
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -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})
|
||||
env_type = os.getenv("ENV_TYPE", "undefined")
|
||||
return render(request, 'products/list.html', {
|
||||
'products': items,
|
||||
'env_type': env_type
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user