Skip to content

Commit e407653

Browse files
committed
chg: specify deployment environment
1 parent 3fdf37d commit e407653

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

src/apps/core/context_processors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
def context_settings(request: HttpRequest) -> Context:
77
return {
88
"PROJECT_NAME": settings.PROJECT_NAME,
9+
"DEPLOYMENT_ENV": settings.DEPLOYMENT_ENV,
910
}

src/apps/core/templates/core/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{% block head_javascript %}
3030
{% endblock head_javascript %}
3131
</head>
32-
<body class="flex h-screen overflow-hidden bg-slate-50">
32+
<body class="flex h-screen overflow-hidden {% if DEPLOYMENT_ENV == 'production' %}bg-slate-50{% else %}bg-red-100{% endif %}">
3333
{% block body %}
3434
<div class="relative flex flex-1 flex-col max-w-full overflow-y-auto overflow-x-hidden">
3535
{% include 'core/partials/navigation.html' %}

src/config/settings/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,3 +406,5 @@
406406
"dev_mode": DEBUG,
407407
}
408408
}
409+
410+
DEPLOYMENT_ENV = env("DEPLOYMENT_ENV", default="production")

src/templates/core/partials/navigation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
class="flex flex-grow items-center justify-between px-4 py-4 shadow-2 md:px-6 2xl:px-11"
88
>
99
<div>
10-
<a class="navbar-brand fw-bolder" href="/">
11-
<img src="{% static 'images/logo.png' %}" style="max-width: 100px" />
10+
<a class="navbar-brand fw-bolder flex items-center" href="/">
11+
<img src="{% static 'images/logo.png' %}" style="max-width: 100px" /> {%if DEPLOYMENT_ENV != 'production' %}<span class="ml-4 font-bold text-xl uppercase text-red-600">{{ DEPLOYMENT_ENV }}</span>{% endif %}
1212
</a>
1313
</div>
1414

0 commit comments

Comments
 (0)