diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index 6563639..10939c5 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index 0905d2c..80aa2b0 100644 --- a/config/settings.py +++ b/config/settings.py @@ -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(",") diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 78ba3c3..52953c4 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/templates/core/index.html b/core/templates/core/index.html index c083a43..95911fe 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -227,7 +227,7 @@ document.addEventListener('DOMContentLoaded', function() {
- Logistics + Logistics
@@ -370,10 +370,10 @@ document.addEventListener('DOMContentLoaded', function() {
- + Freight truck
- + Warehouse interior
diff --git a/core/templates/registration/login.html b/core/templates/registration/login.html index 6444cba..adf3655 100644 --- a/core/templates/registration/login.html +++ b/core/templates/registration/login.html @@ -35,6 +35,10 @@ {% endif %} +
+ {% trans "Forgot password?" %} +
+
@@ -63,4 +67,4 @@
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/core/templates/registration/password_reset.html b/core/templates/registration/password_reset.html new file mode 100644 index 0000000..f55ca93 --- /dev/null +++ b/core/templates/registration/password_reset.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +
+
+
+
+
+
+

{% trans "Reset Password" %}

+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+
+
+
+
+
+{% endblock %} diff --git a/core/templates/registration/password_reset_complete.html b/core/templates/registration/password_reset_complete.html new file mode 100644 index 0000000..5261cb2 --- /dev/null +++ b/core/templates/registration/password_reset_complete.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +
+
+
+
+
+
+

{% trans "Password Reset Complete" %}

+

{% trans "Your password has been set. You may go ahead and log in now." %}

+ {% trans "Log in" %} +
+
+
+
+
+
+{% endblock %} diff --git a/core/templates/registration/password_reset_confirm.html b/core/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000..da20e75 --- /dev/null +++ b/core/templates/registration/password_reset_confirm.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +
+
+
+
+
+
+

{% trans "Set New Password" %}

+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+
+
+
+
+
+{% endblock %} diff --git a/core/templates/registration/password_reset_done.html b/core/templates/registration/password_reset_done.html new file mode 100644 index 0000000..4c7d5cd --- /dev/null +++ b/core/templates/registration/password_reset_done.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block content %} +
+
+
+
+
+
+

{% trans "Password Reset Requested" %}

+

{% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %}

+

{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}

+ {% trans "Return to login" %} +
+
+
+
+
+
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 839422a..4b56963 100644 --- a/core/urls.py +++ b/core/urls.py @@ -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"), -] \ No newline at end of file + # 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///', 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'), +] diff --git a/static/images/truck_hero.jpg b/static/images/truck_hero.jpg new file mode 100644 index 0000000..af339ca Binary files /dev/null and b/static/images/truck_hero.jpg differ diff --git a/static/images/truck_road.jpg b/static/images/truck_road.jpg new file mode 100644 index 0000000..3cc1118 Binary files /dev/null and b/static/images/truck_road.jpg differ diff --git a/static/images/warehouse.jpg b/static/images/warehouse.jpg new file mode 100644 index 0000000..94cba4c Binary files /dev/null and b/static/images/warehouse.jpg differ