-
Notifications
You must be signed in to change notification settings - Fork 21
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
baa67bf
commit 2bd9741
Showing
10 changed files
with
205 additions
and
25 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 |
---|---|---|
|
@@ -37,6 +37,8 @@ POSTGRES_PASSWORD=secret | |
# Email server variables | ||
SMTP_SERVER=mailpit | ||
SMTP_PORT=1025 | ||
SMTP_USE_TLS=False | ||
SMTP_USE_SSL=False | ||
SMTP_USER= | ||
SMTP_PASSWORD= | ||
SMTP_SENDER_MAIL="[email protected]" | ||
|
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 |
---|---|---|
|
@@ -194,11 +194,15 @@ def debug(request): | |
# Sphinx docs | ||
DOCS_ROOT = "/jandig/build/" | ||
|
||
SMTP_SERVER = env("SMTP_SERVER", default="mailpit") | ||
SMTP_PORT = env("SMTP_PORT", default=1025) | ||
SMTP_USER = env("SMTP_USER", default="[email protected]") | ||
SMTP_PASSWORD = env("SMTP_PASSWORD", default="password") | ||
SMTP_SENDER_MAIL = env("SMTP_SENDER_MAIL", default="[email protected]") | ||
|
||
DEFAULT_FROM_EMAIL = env("SMTP_SENDER_MAIL", default="[email protected]") | ||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' | ||
EMAIL_HOST = env("SMTP_SERVER", default="mailpit") | ||
EMAIL_USE_TLS = env("SMTP_USE_TLS", default=False) | ||
EMAIL_PORT = env("SMTP_PORT", default=1025) | ||
EMAIL_HOST_USER = env("SMTP_USER", default="[email protected]") | ||
EMAIL_HOST_PASSWORD = env("SMTP_PASSWORD", default="password") | ||
EMAIL_USE_SSL = False | ||
|
||
# Recaptcha | ||
RECAPTCHA_ENABLED = env("RECAPTCHA_ENABLED", default=False) | ||
|
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,59 @@ | ||
{% extends '/core/arviewer.jinja2' %} | ||
{% block content %} | ||
<div class="form-content my-3 p-3"> | ||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col-lg-5"> | ||
<div class="card shadow-lg border-0 rounded-lg mt-0 mb-3"> | ||
<div class="card-header justify-content-center"> | ||
<div id="error_div"></div> | ||
<h3 class="font-weight-light my-4 text-center">Forgot Password?</h3> | ||
</div> | ||
{% if form.errors %} | ||
<div class="alert alert-danger alert-dismissible" role="alert"> | ||
<div id="form_errors"> | ||
{% for key, value in form.errors.items %} | ||
<strong>{{ value }}</strong> | ||
{% endfor %} | ||
</div> | ||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
{% endif %} | ||
<div class="card-body"> | ||
<form method="POST"> | ||
{{ csrf_input }} | ||
<div class="form-row"> | ||
<div class="col-md-10 offset-md-1"> | ||
<div class="form-group"> | ||
<label class="small mb-1" for="id_email">Email</label> | ||
<input type="email" name="email" class="form-control" | ||
autocomplete="email" maxlength="254" required id="id_email" | ||
placeholder="Enter email"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-row"> | ||
<div class="col-md-10 offset-md-1"> | ||
<div class="form-group mt-0 mb-1"> | ||
<button type="submit" class="col-md-12 btn btn-dark">Submit | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="card-footer text-center"> | ||
<div class="small"> | ||
<a href="{{ url('signup') }}">Create A New Account</a><br><br> | ||
<a href="{{ url('login') }}">Back To Login</a><br> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
{% endblock content %} |
15 changes: 15 additions & 0 deletions
15
src/users/jinja2/users/html/password_reset_complete.jinja2
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,15 @@ | ||
{% extends '/core/arviewer.jinja2' %} | ||
{% block title %} Password Reset {% endblock title%} | ||
{% block content %} | ||
<div class="container my-3 p-3"> | ||
<div class="row justify-content-center"> | ||
<div class="col-lg-5"> | ||
<div class="card shadow-lg border-0 rounded-lg mt-0 mb-3"> | ||
<div class="alert alert-info"> | ||
Your password has been set. You may go ahead and <a href="{{ url('login') }}">Login Here</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock content %} |
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,71 @@ | ||
{% extends '/core/arviewer.jinja2' %} | ||
{% block title %} Password Reset {% endblock title%} | ||
{% block content %} | ||
<div class="form-content my-3 p-3"> | ||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col-lg-5"> | ||
{% if validlink %} | ||
<div class="card shadow-lg border-0 rounded-lg mt-0 mb-3"> | ||
<div class="card-header justify-content-center"> | ||
<h3 class="font-weight-light my-4 text-center">Reset Your Password</h3> | ||
</div> | ||
{% if form.errors %} | ||
<div class="alert alert-danger alert-dismissible" role="alert"> | ||
<div id="form_errors"> | ||
{% for key, value in form.errors.items() %} | ||
<strong>{{ value }}</strong> | ||
{% endfor %} | ||
</div> | ||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="card-body"> | ||
<form method="POST"> | ||
{{ csrf_input }} | ||
<div class="form-row"> | ||
<div class="col-md-10 offset-md-1"> | ||
<div class="form-group"> | ||
<label class="small mb-1" for="id_new_password1">New Password</label> | ||
<input type="password" name="new_password1" autocomplete="new-password" | ||
class="form-control" required id="id_new_password1" | ||
placeholder="Enter password"/> | ||
<span> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-row"> | ||
<div class="col-md-10 offset-md-1"> | ||
<div class="form-group"> | ||
<label class="small mb-1" for="id_new_password2">New Password Confirmation</label> | ||
<input type="password" name="new_password2" autocomplete="new-password" | ||
required id="id_new_password2" class="form-control" | ||
placeholder="Confirm password"/> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-row"> | ||
<div class="col-md-10 offset-md-1"> | ||
<div class="form-group mt-0 mb-1"> | ||
<button type="submit" class="col-md-12 btn btn-dark" id="reset">Reset Password</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
{% else %} | ||
<div class="alert alert-warning"> | ||
The password reset link was invalid, possibly because it has already been used. | ||
Please request a new password reset. | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock content %} |
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,11 @@ | ||
|
||
To initiate the password reset process for your {{ user.email }} Django Registration/Login App Account, | ||
click the link below: | ||
|
||
{{ protocol }}://{{ domain }}{{ url('password_reset_confirm',args=[uid,token]) }} | ||
|
||
If clicking the link above doesn't work, please copy and paste the URL in a new browser | ||
window instead. | ||
|
||
Sincerely, | ||
Jandig Team |
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 @@ | ||
Jandig Password Reset |
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
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