Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Rename context vars

Marcin Gębalaeca90f3c851f
diff --git a/saleor/core/views.py b/saleor/core/views.py
index 803056c348..bed82cd63d 100644
--- a/saleor/core/views.py
+++ b/saleor/core/views.py
@@ -4,8 +4,10 @@ from django.template.response import TemplateResponse
def home(request):
- storefront = os.environ.get("STOREFRONT_URL", "")
- dashboard = os.environ.get("DASHBOARD_URL", "")
+ storefront_url = os.environ.get("STOREFRONT_URL", "")
+ dashboard_url = os.environ.get("DASHBOARD_URL", "")
return TemplateResponse(
- request, "home.html", {"storefront": storefront, "dashboard": dashboard}
+ request,
+ "home.html",
+ {"storefront_url": storefront_url, "dashboard_url": dashboard_url},
)
diff --git a/templates/home.html b/templates/home.html
index 05b2f53122..45535cd3fd 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -700,8 +700,8 @@
</p>
<div class="tile__container">
- {% if dashboard %}
- <a href="{{dashboard}}" target="_blank">
+ {% if dashboard_url %}
+ <a href="{{ dashboard_url }}" target="_blank">
<button class="btn tile">
<svg
class="tile__icon"
@@ -912,8 +912,8 @@
<span class="tile__label" href="#">Dashboard</span>
</button>
</a>
- {% endif %} {% if storefront %}
- <a href="{{storefront}}" target="_blank">
+ {% endif %} {% if storefront_url %}
+ <a href="{{ storefront_url }}" target="_blank">
<button class="btn tile">
<svg
class="tile__icon"