diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 3a6af4cf..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index 17533c4c..b1af1cb7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ +.DS_Store - - +Admin/__pycache__/ # git ignore virt env # ignore media files diff --git a/Admin/.DS_Store b/Admin/.DS_Store deleted file mode 100644 index 47c4d6f0..00000000 Binary files a/Admin/.DS_Store and /dev/null differ diff --git a/Admin/Admin/__pycache__/settings.cpython-39.pyc b/Admin/Admin/__pycache__/settings.cpython-39.pyc index f28d464d..ea84755b 100644 Binary files a/Admin/Admin/__pycache__/settings.cpython-39.pyc and b/Admin/Admin/__pycache__/settings.cpython-39.pyc differ diff --git a/Admin/Admin/settings.py b/Admin/Admin/settings.py index 13048fe1..e483f21d 100755 --- a/Admin/Admin/settings.py +++ b/Admin/Admin/settings.py @@ -154,3 +154,13 @@ # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" + + +# Email settings +EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" +EMAIL_HOST = "smtp.gmail.com" +EMAIL_PORT = 587 +EMAIL_USE_TLS = True +EMAIL_HOST_USER = 'pkelly5511@gmail.com' +EMAIL_HOST_PASSWORD = 'ocsobosrmbgljcun' + diff --git a/Admin/db.sqlite3 b/Admin/db.sqlite3 index 53e2d62e..0aee99ec 100644 Binary files a/Admin/db.sqlite3 and b/Admin/db.sqlite3 differ diff --git a/Admin/media/.DS_Store b/Admin/media/.DS_Store deleted file mode 100644 index a7199a02..00000000 Binary files a/Admin/media/.DS_Store and /dev/null differ diff --git a/Admin/website/.DS_Store b/Admin/website/.DS_Store deleted file mode 100644 index 4d09cc58..00000000 Binary files a/Admin/website/.DS_Store and /dev/null differ diff --git a/Admin/website/__pycache__/urls.cpython-39.pyc b/Admin/website/__pycache__/urls.cpython-39.pyc index 160f99c3..381a457b 100644 Binary files a/Admin/website/__pycache__/urls.cpython-39.pyc and b/Admin/website/__pycache__/urls.cpython-39.pyc differ diff --git a/Admin/website/templates/home.html b/Admin/website/templates/home.html index d4b1d3a0..1aa5532c 100755 --- a/Admin/website/templates/home.html +++ b/Admin/website/templates/home.html @@ -75,6 +75,7 @@

LOGIN:

+ Forgot Password? diff --git a/Admin/website/templates/password_reset_complete.html b/Admin/website/templates/password_reset_complete.html new file mode 100644 index 00000000..40b65d91 --- /dev/null +++ b/Admin/website/templates/password_reset_complete.html @@ -0,0 +1,7 @@ +{% extends 'base.html' %} +{% block title %}Password Reset{% endblock %} +{% block content %} +

Your password has been reset. Go login with your new password + home +

+{% endblock %} diff --git a/Admin/website/templates/password_reset_confirm.html b/Admin/website/templates/password_reset_confirm.html new file mode 100644 index 00000000..d48318e1 --- /dev/null +++ b/Admin/website/templates/password_reset_confirm.html @@ -0,0 +1,13 @@ +{% extends 'base.html' %} +{% block content %} + {% if validlink %} +

Change Password

+
+{% csrf_token %} +{{ form.as_p }} + +
+{% else %} +

The password reset link was invalid, possibly because it has already been used. Please request a new password reset.

+{% endif %} +{% endblock %} \ No newline at end of file diff --git a/Admin/website/templates/password_reset_done.html b/Admin/website/templates/password_reset_done.html new file mode 100644 index 00000000..34dbb8f5 --- /dev/null +++ b/Admin/website/templates/password_reset_done.html @@ -0,0 +1,7 @@ +{% extends 'base.html' %} +{% block title %}Password Reset{% endblock %} +{% block content %} +

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

+ +

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

+{% endblock %} \ No newline at end of file diff --git a/Admin/website/templates/password_reset_form.html b/Admin/website/templates/password_reset_form.html new file mode 100644 index 00000000..a40d418c --- /dev/null +++ b/Admin/website/templates/password_reset_form.html @@ -0,0 +1,12 @@ +{% extends 'base.html' %} +{% block title %}Password Reset{% endblock %} +{% block content %} +
+

Password Reset

+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+{% endblock %} \ No newline at end of file diff --git a/Admin/website/urls.py b/Admin/website/urls.py index 00ebed1b..22ec1590 100755 --- a/Admin/website/urls.py +++ b/Admin/website/urls.py @@ -1,5 +1,7 @@ from django.urls import path from . import views +from django.contrib.auth import views as auth_views + urlpatterns = [ path("", views.home, name="home"), @@ -13,6 +15,10 @@ path("edit_record/", views.edit_record, name="edit_record"), # path("business_record/", views.B_record, name="B_record"), path("upload/", views.upload, name="upload"), - path("monitor/", views.traffic_monitor, name="monitor") + path("monitor/", views.traffic_monitor, name="monitor"), + path("password_reset/",auth_views.PasswordResetView.as_view(template_name='password_reset_form.html'),name="password_reset"), + path("password_reset_done/",auth_views.PasswordResetDoneView.as_view(template_name='password_reset_done.html'),name="password_reset_done"), + path("password_reset_confirm///",auth_views.PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'),name="password_reset_confirm"), + path("password_reset_complete/",auth_views.PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'),name="password_reset_complete"), ] diff --git a/venv/.DS_Store b/venv/.DS_Store deleted file mode 100644 index 7780a4c9..00000000 Binary files a/venv/.DS_Store and /dev/null differ diff --git a/venv/lib/python3.9/site-packages/.DS_Store b/venv/lib/python3.9/site-packages/.DS_Store deleted file mode 100644 index 9d3091eb..00000000 Binary files a/venv/lib/python3.9/site-packages/.DS_Store and /dev/null differ