forked from yahyaaly151989/Mastering_Django
-
Notifications
You must be signed in to change notification settings - Fork 0
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
faf2014
commit 736a110
Showing
13 changed files
with
104 additions
and
3 deletions.
There are no files selected for viewing
Binary file modified
BIN
-154 Bytes
(79%)
Module04/bookmarks/account/__pycache__/urls.cpython-311.pyc
Binary file not shown.
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
8 changes: 8 additions & 0 deletions
8
Module04/bookmarks/account/templates/registration/password_change_done.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,8 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block title %} Password changed {% endblock %} | ||
|
||
{% block content %} | ||
<h1>Password changed</h1> | ||
<p>Your password has been changed successfully.</p> | ||
{% endblock %} |
13 changes: 13 additions & 0 deletions
13
Module04/bookmarks/account/templates/registration/password_change_form.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,13 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block title %} Change your password {% endblock %} | ||
|
||
{% block content %} | ||
<h1>Change your password</h1> | ||
<p>Use this form to change your password.</p> | ||
<form method="post"> | ||
{{ form.as_p }} | ||
{% csrf_token %} | ||
<input type="submit" value="Change"> | ||
</form> | ||
{% endblock %} |
8 changes: 8 additions & 0 deletions
8
Module04/bookmarks/account/templates/registration/password_reset_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,8 @@ | ||
{% extends "base.html"%} | ||
|
||
{% block title %} Password reset {% endblock %} | ||
|
||
{% block content %} | ||
<h1>Password reset</h1> | ||
<p>Your password has been set. You can <a href="{% url 'login' %}">Login now</a> </p> | ||
{% endblock %} |
18 changes: 18 additions & 0 deletions
18
Module04/bookmarks/account/templates/registration/password_reset_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,18 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block title %} Reset your password {% endblock %} | ||
|
||
{% block content %} | ||
<h1>Reset your password</h1> | ||
|
||
{% if validlink %} | ||
<p>Please enter your password twice.</p> | ||
<form method="post"> | ||
{{ form.as_p }} | ||
{% csrf_token %} | ||
<p><input type="submit" value="Change your password" /></p> | ||
</form> | ||
{% else %} | ||
<p>The link is not valid......</p> | ||
{% endif %} | ||
{% endblock %} |
9 changes: 9 additions & 0 deletions
9
Module04/bookmarks/account/templates/registration/password_reset_done.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,9 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block title %} Reset your password {% endblock %} | ||
|
||
{% block content %} | ||
<h1>Reset your password</h1> | ||
<p>We have send you a reset password to your email address.</p> | ||
<p>If you don't receive a reset password email, please make sure you enter your email address correctly.</p> | ||
{% endblock %} |
6 changes: 6 additions & 0 deletions
6
Module04/bookmarks/account/templates/registration/password_reset_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,6 @@ | ||
Someone asked for password reset for email {{ email }}. | ||
|
||
Follow the link below: | ||
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} | ||
|
||
Your username, in case you've forgotten: {{ user.get_username }} |
14 changes: 14 additions & 0 deletions
14
Module04/bookmarks/account/templates/registration/password_reset_form.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,14 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block title %} Reset your password {% endblock %} | ||
|
||
{% block content %} | ||
<h1>Forgotten your password</h1> | ||
<p>Enter your email address to obtain a new password.</p> | ||
|
||
<form method="post"> | ||
{{ form.as_p }} | ||
{% csrf_token %} | ||
<p><input type="submit" value="Send email"></p> | ||
</form> | ||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
from django.urls import path | ||
from django.urls import path, include | ||
from . import views | ||
from django.contrib.auth import views as auth_views | ||
|
||
|
||
urlpatterns = [ | ||
# path('login/', views.user_login, name='login'), | ||
path('login/', auth_views.LoginView.as_view(), name='login'), | ||
path('logout/', auth_views.LogoutView.as_view(), name='logout'), | ||
# path('login/', auth_views.LoginView.as_view(), name='login'), | ||
# path('logout/', auth_views.LogoutView.as_view(), name='logout'), | ||
|
||
# path('password-change/', auth_views.PasswordChangeView.as_view(), name='password_change'), | ||
# path('password-change/done/', auth_views.PasswordChangeDoneView.as_view(), name='password_change_done'), | ||
|
||
# path('password-reset', auth_views.PasswordResetView.as_view(), name='password_reset'), | ||
# path('password-reset/done/', auth_views.PasswordResetDoneView.as_view(), name='password_reset_done'), | ||
# path('password-reset/<uidb64>/<token>', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'), | ||
# path('password-reset/complete/', auth_views.PasswordResetCompleteView.as_view(), name='password_reset_complete'), | ||
|
||
|
||
path('', include('django.contrib.auth.urls')), | ||
path('dashboard/', views.dashboard, name='dashboard'), | ||
|
||
|
||
|
||
] | ||
8 |
Binary file modified
BIN
+75 Bytes
(100%)
Module04/bookmarks/bookmarks/__pycache__/settings.cpython-311.pyc
Binary file not shown.
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
Binary file not shown.