-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59df9c5
commit 97a23e8
Showing
9 changed files
with
173 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
{% load static %} | ||
|
||
{% block title %} | ||
Login | ||
Change Password | ||
{% endblock %} | ||
|
||
{% block css_files %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
web-app/django/VIM/apps/main/templates/registration/reset_password.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
|
||
{% block title %} | ||
Reset Password | ||
{% endblock %} | ||
|
||
{% block css_files %} | ||
<link rel="stylesheet" type="text/css" href="{% static 'main/css/login.css' %}"> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="mr-3 p-4 col-md-12"> | ||
{% if messages %} | ||
<div class="alert alert-success alert-dismissible"> | ||
{% for message in messages %} | ||
{{ message }} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
{% if form.errors %} | ||
<div class="alert alert-danger alert-dismissible"> | ||
{% for field, error in form.errors.items %} | ||
{{ error }} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
<div class="col-md mt-4 login-form" id="login"> | ||
<h5><strong>Reset Password</strong></h5> | ||
<p class="mt-4">Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one.</p> | ||
<form method="post"> | ||
{% csrf_token %} | ||
<div class="mt-4 mb-4"> | ||
<label for="exampleInputEmail" class="form-label">Email Address</label> | ||
{{ form.email }} | ||
</div> | ||
<button type="submit" class="btn btn-primary">Send Password Reset Email</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
22 changes: 22 additions & 0 deletions
22
web-app/django/VIM/apps/main/templates/registration/reset_password_complete.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
|
||
{% block title %} | ||
Reset Password | ||
{% endblock %} | ||
|
||
{% block css_files %} | ||
<link rel="stylesheet" type="text/css" href="{% static 'main/css/login.css' %}"> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="mr-3 p-4 col-md-12"> | ||
<div class="col-md mt-4 login-form" id="login"> | ||
<h5><strong>Password Reset Complete</strong></h5> | ||
<p class="mt-4">Your password has been successfully reset. You can now <a href="{% url 'main:login' %}">log in</a> with your new password.</p> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
29 changes: 29 additions & 0 deletions
29
web-app/django/VIM/apps/main/templates/registration/reset_password_confirm.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
|
||
{% block title %} | ||
Reset Password | ||
{% endblock %} | ||
|
||
{% block css_files %} | ||
<link rel="stylesheet" type="text/css" href="{% static 'main/css/login.css' %}"> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="mr-3 p-4 col-md-12"> | ||
<div class="col-md mt-4 login-form" id="login"> | ||
<h5><strong>Set New Password</strong></h5> | ||
<form class="mt-4" method="post"> | ||
{% csrf_token %} | ||
{{ form.new_password1.label_tag }} | ||
{{ form.new_password1 }} | ||
{{ form.new_password2.label_tag }} | ||
{{ form.new_password2 }} | ||
<button type="submit" class="btn btn-primary">Change Password</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
7 changes: 7 additions & 0 deletions
7
web-app/django/VIM/apps/main/templates/registration/reset_password_email.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Please click the following link to reset your password: | ||
|
||
{% autoescape off %} | ||
{{ protocol }}://{{ domain }}{% url 'main:reset_password_confirm' uidb64=uid token=token %} | ||
{% endautoescape %} | ||
|
||
If you didn't request a password reset, please ignore this message. |
23 changes: 23 additions & 0 deletions
23
web-app/django/VIM/apps/main/templates/registration/reset_password_sent.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
|
||
{% block title %} | ||
Reset Password | ||
{% endblock %} | ||
|
||
{% block css_files %} | ||
<link rel="stylesheet" type="text/css" href="{% static 'main/css/login.css' %}"> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="mr-3 p-4 col-md-12"> | ||
<div class="col-md mt-4 login-form" id="login"> | ||
<h5><strong>Password Reset Email Sent</strong></h5> | ||
<p class="mt-4">We've sent you an email with instructions to reset your password. Please check your inbox.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,16 @@ | |
|
||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" | ||
|
||
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" | ||
EMAIL_HOST = "email-smtp.us-west-2.amazonaws.com" | ||
EMAIL_PORT = 587 | ||
EMAIL_HOST_USER = os.getenv("AWS_EMAIL_HOST_USER") | ||
EMAIL_HOST_PASSWORD = os.getenv("AWS_EMAIL_HOST_PASSWORD") | ||
EMAIL_USE_TLS = True | ||
|
||
# Copied from CantusDB, will need to change | ||
DEFAULT_FROM_EMAIL = "[email protected]" | ||
|
||
# DEPLOYMENT SETTINGS | ||
|
||
CSRF_COOKIE_SECURE = IS_PRODUCTION | ||
|