Skip to content

Commit af52ecb

Browse files
committed
refactor(multi): Update environment and templates
1 parent 98b8da3 commit af52ecb

File tree

7 files changed

+21
-16
lines changed

7 files changed

+21
-16
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
DEBUG=True
77
DJANGO_ENVIRONMENT="local"
8-
SECRET_KEY = "K5tRjVxP9qCwZ2gH8sN6mT3dF7aK1pW4eX7yV9uL6kG3jB2tR8qE5zA1rC"
8+
SECRET_KEY = ""
99

1010
# Update this with the actual base URL of your application
11-
BASE_URL = 'http://127.0.0.1:8000'
11+
BASE_URL = 'http://127.0.0.1:8000'

.env.prod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
DEBUG=False
77
DJANGO_ENVIRONMENT="production"
8-
SECRET_KEY = "K5tRjVxP9qCwZ2gH8sN6mT3dF7aK1pW4eX7yV9uL6kG3jB2tR8qE5zA1rC"
8+
SECRET_KEY = ""
99

1010
# Update this with the actual base URL of your application
11-
BASE_URL='https://your-production-url'
11+
BASE_URL='https://your-production-url'

apps/ui/templates/ui_typography.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
{% block title %}Typography - UI elements{% endblock %}
77

88
{% block content %}
9-
<h4 class="py-3 mb-4">
10-
{% translate "Typography" %}
11-
</h4>
9+
<h4 class="py-3 mb-4">"Typography"</h4>
1210

1311
<div class="row">
1412
<!-- Headings -->

config/settings.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
https://docs.djangoproject.com/en/5.0/ref/settings/
1111
"""
1212
import os
13+
import random
14+
import string
1315
from pathlib import Path
1416

1517
from dotenv import load_dotenv
@@ -24,9 +26,14 @@
2426
# Quick-start development settings - unsuitable for production
2527
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
2628

29+
# Update secret key in .env file and .env.prod file
30+
# SECRET_KEY = os.environ.get("SECRET_KEY", default='')
2731

2832
# SECURITY WARNING: keep the secret key used in production secret!
29-
SECRET_KEY = os.environ.get("SECRET_KEY", default='')
33+
# If using the .env file for SECRET_KEY then comment below random SECRET_KEY generation code.
34+
SECRET_KEY = os.environ.get("SECRET_KEY")
35+
if not SECRET_KEY:
36+
SECRET_KEY = "".join(random.choice(string.ascii_lowercase) for i in range(32))
3037

3138

3239
# SECURITY WARNING: don't run with debug turned on in production!
@@ -175,4 +182,4 @@
175182

176183

177184
# Your stuff...
178-
# ------------------------------------------------------------------------------
185+
# ------------------------------------------------------------------------------

templates/layout/master.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<link rel="shortcut icon" type="image/x-icon" href="{% static 'img/favicon/favicon.ico' %}" />
1717

1818
<!-- Include the styles partial -->
19-
{% include is_front|yesno:"./partials/styles_front.html,./partials/styles.html" %}
19+
{% include "./partials/styles.html" %}
2020

2121
{% block vendor_css %}{% endblock vendor_css %}
2222

@@ -25,7 +25,7 @@
2525

2626

2727
<!-- Include the scripts partial (required ) -->
28-
{% include is_front|yesno:"./partials/scripts_includes_front.html,./partials/scripts_includes.html" %}
28+
{% include "./partials/scripts_includes.html" %}
2929

3030
</head>
3131

@@ -35,7 +35,7 @@
3535
{% block layout %}
3636
{% endblock layout %}
3737

38-
{% include is_front|yesno:"./partials/scripts_front.html,./partials/scripts.html" %}
38+
{% include "./partials/scripts.html" %}
3939

4040
<!--Vendors Javascript-->
4141
{% block vendor_js %} {% endblock vendor_js %}

templates/layout/partials/menu/vertical/vertical_menu.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,17 @@
199199
<div class="text-truncate" data-i18n="Authentications">Authentications</div>
200200
</a>
201201
<ul class="menu-sub">
202-
<li class="menu-item {% if '/login_basic/' in request.path %}active{% endif %}">
202+
<li class="menu-item {% if '/login/' in request.path %}active{% endif %}">
203203
<a href="{% url 'auth-login-basic' %}" class="menu-link" target="_blank">
204204
<div class="text-truncate" data-i18n="Login">Login</div>
205205
</a>
206206
</li>
207-
<li class="menu-item {% if '/register_basic/' in request.path %}active{% endif %}">
207+
<li class="menu-item {% if '/register/' in request.path %}active{% endif %}">
208208
<a href="{% url 'auth-register-basic' %}" class="menu-link" target="_blank">
209209
<div class="text-truncate" data-i18n="Register">Register</div>
210210
</a>
211211
</li>
212-
<li class="menu-item {% if '/forgot_password_basic/' in request.path %}active{% endif %}">
212+
<li class="menu-item {% if '/forgot_password/' in request.path %}active{% endif %}">
213213
<a href="{% url 'auth-forgot-password-basic' %}" class="menu-link" target="_blank">
214214
<div class="text-truncate" data-i18n="Frogot Password">Frogot Password</div>
215215
</a>

templates/layout/partials/navbar/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<nav class="layout-navbar {{container_class}} navbar navbar-expand-xl navbar-detached align-items-center bg-navbar-theme" id="layout-navbar">
66
{% if not navbar_hide_toggle %}
7-
<div class="layout-menu-toggle navbar-nav align-items-xl-center me-3 me-xl-0 {{ menu_horizontal|yesno:'d-xl-none,' }} {{ content_navbar|yesno:'d-xl-none,' }}">
7+
<div class="layout-menu-toggle navbar-nav align-items-xl-center me-3 me-xl-0 d-xl-none">
88
<a class="nav-item nav-link px-0 me-xl-4" href="javascript:void(0)">
99
<i class="bx bx-menu bx-sm"></i>
1010
</a>

0 commit comments

Comments
 (0)