Autosave: 20260307-080808
This commit is contained in:
parent
b557d8bcd7
commit
2cb5d02688
Binary file not shown.
@ -167,13 +167,13 @@ EMAIL_BACKEND = os.getenv(
|
||||
"EMAIL_BACKEND",
|
||||
"django.core.mail.backends.smtp.EmailBackend"
|
||||
)
|
||||
EMAIL_HOST = os.getenv("EMAIL_HOST", "127.0.0.1")
|
||||
EMAIL_PORT = int(os.getenv("EMAIL_PORT", "587"))
|
||||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER", "")
|
||||
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD", "")
|
||||
EMAIL_USE_TLS = os.getenv("EMAIL_USE_TLS", "true").lower() == "true"
|
||||
EMAIL_USE_SSL = os.getenv("EMAIL_USE_SSL", "false").lower() == "true"
|
||||
DEFAULT_FROM_EMAIL = os.getenv("DEFAULT_FROM_EMAIL", "no-reply@example.com")
|
||||
EMAIL_HOST = os.getenv("EMAIL_HOST", os.getenv("SMTP_HOST", "127.0.0.1"))
|
||||
EMAIL_PORT = int(os.getenv("EMAIL_PORT", os.getenv("SMTP_PORT", "587")))
|
||||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER", os.getenv("SMTP_USER", ""))
|
||||
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD", os.getenv("SMTP_PASS", ""))
|
||||
EMAIL_USE_TLS = os.getenv("EMAIL_USE_TLS", "true").lower() == "true" if os.getenv("SMTP_SECURE") != "ssl" else False
|
||||
EMAIL_USE_SSL = os.getenv("EMAIL_USE_SSL", "false").lower() == "true" or os.getenv("SMTP_SECURE") == "ssl"
|
||||
DEFAULT_FROM_EMAIL = os.getenv("DEFAULT_FROM_EMAIL", os.getenv("MAIL_FROM", "no-reply@example.com"))
|
||||
CONTACT_EMAIL_TO = [
|
||||
item.strip()
|
||||
for item in os.getenv("CONTACT_EMAIL_TO", DEFAULT_FROM_EMAIL).split(",")
|
||||
|
||||
Binary file not shown.
@ -227,7 +227,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<img src="https://img.freepik.com/free-vector/delivery-truck-with-packages-concept_23-2148464601.jpg" alt="Logistics" class="img-fluid rounded-4 shadow-lg">
|
||||
<img src="{% static "images/truck_hero.jpg" %}" alt="Logistics" class="img-fluid rounded-4 shadow-lg">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -370,10 +370,10 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
<div class="col-lg-7">
|
||||
<div class="row g-4">
|
||||
<div class="col-6">
|
||||
<img src="https://img.freepik.com/free-photo/view-truck-with-cargo_23-2150821510.jpg" class="img-fluid rounded-4 shadow" alt="">
|
||||
<img src="{% static "images/truck_road.jpg" %}" class="img-fluid rounded-4 shadow" alt="Freight truck">
|
||||
</div>
|
||||
<div class="col-6 mt-5">
|
||||
<img src="https://img.freepik.com/free-photo/industrial-port-container-yard-with-cranes-logistic-import-export-business-logistics-background_35641-2693.jpg" class="img-fluid rounded-4 shadow" alt="">
|
||||
<img src="{% static "images/warehouse.jpg" %}" class="img-fluid rounded-4 shadow" alt="Warehouse interior">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -35,6 +35,10 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{% url 'password_reset' %}" class="small">{% trans "Forgot password?" %}</a>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label d-block">{{ form.otp_method.label }}</label>
|
||||
<div class="btn-group w-100" role="group">
|
||||
@ -63,4 +67,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
23
core/templates/registration/password_reset.html
Normal file
23
core/templates/registration/password_reset.html
Normal file
@ -0,0 +1,23 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-5">
|
||||
<div class="card shadow">
|
||||
<div class="card-body p-5">
|
||||
<h2 class="text-center mb-4">{% trans "Reset Password" %}</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit" class="btn btn-primary w-100 py-2">{% trans "Reset Password" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
20
core/templates/registration/password_reset_complete.html
Normal file
20
core/templates/registration/password_reset_complete.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-5">
|
||||
<div class="card shadow">
|
||||
<div class="card-body p-5">
|
||||
<h2 class="text-center mb-4">{% trans "Password Reset Complete" %}</h2>
|
||||
<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
|
||||
<a href="{% url 'login' %}" class="btn btn-primary w-100">{% trans "Log in" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
23
core/templates/registration/password_reset_confirm.html
Normal file
23
core/templates/registration/password_reset_confirm.html
Normal file
@ -0,0 +1,23 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-5">
|
||||
<div class="card shadow">
|
||||
<div class="card-body p-5">
|
||||
<h2 class="text-center mb-4">{% trans "Set New Password" %}</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit" class="btn btn-primary w-100 py-2">{% trans "Save New Password" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
21
core/templates/registration/password_reset_done.html
Normal file
21
core/templates/registration/password_reset_done.html
Normal file
@ -0,0 +1,21 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-5">
|
||||
<div class="card shadow">
|
||||
<div class="card-body p-5">
|
||||
<h2 class="text-center mb-4">{% trans "Password Reset Requested" %}</h2>
|
||||
<p>{% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %}</p>
|
||||
<p>{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}</p>
|
||||
<a href="{% url 'login' %}" class="btn btn-primary w-100">{% trans "Return to login" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@ -37,4 +37,9 @@ urlpatterns = [
|
||||
path("api/chat/", views.chat_api, name="chat_api"),
|
||||
path("profile/send-otp/", views.send_otp_profile, name="send_otp_profile"),
|
||||
path("profile/verify-otp/", views.verify_otp_profile, name="verify_otp_profile"),
|
||||
]
|
||||
# Password Reset URLs
|
||||
path('password-reset/', auth_views.PasswordResetView.as_view(template_name='registration/password_reset.html'), name='password_reset'),
|
||||
path('password-reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='registration/password_reset_done.html'), name='password_reset_done'),
|
||||
path('password-reset-confirm/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='registration/password_reset_confirm.html'), name='password_reset_confirm'),
|
||||
path('password-reset-complete/', auth_views.PasswordResetCompleteView.as_view(template_name='registration/password_reset_complete.html'), name='password_reset_complete'),
|
||||
]
|
||||
|
||||
BIN
static/images/truck_hero.jpg
Normal file
BIN
static/images/truck_hero.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
static/images/truck_road.jpg
Normal file
BIN
static/images/truck_road.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
BIN
static/images/warehouse.jpg
Normal file
BIN
static/images/warehouse.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Loading…
x
Reference in New Issue
Block a user