diff --git a/app/templates/app/base_reset.html b/app/templates/app/base_reset.html new file mode 100644 index 0000000000000000000000000000000000000000..3fc86b803b6179ffa59b0a7aaa05f6b756c03bb6 --- /dev/null +++ b/app/templates/app/base_reset.html @@ -0,0 +1,130 @@ +{% load static %} + + + + + + Digipus + + + + + + + {% block title %}{% endblock %} + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + +
+ + + + + + +
+ {% block content %}{% endblock %} +
+ + +
+ + + +
+
+ +
+
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/templates/password_reset.html b/app/templates/password_reset.html new file mode 100644 index 0000000000000000000000000000000000000000..148908564a188bfaf8b1a2639bbc8162ea16a58e --- /dev/null +++ b/app/templates/password_reset.html @@ -0,0 +1,18 @@ +{% extends 'app/base_reset.html' %} +{% block title %}Reset Password{% endblock%} +{% block content %} + + +

Reset Password

+

+

Forgotten your password ? Enter email address below, and we'll email instructions for setting a new one.

+ +
+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+ +{% endblock %} \ No newline at end of file diff --git a/app/templates/password_reset_done.html b/app/templates/password_reset_done.html new file mode 100644 index 0000000000000000000000000000000000000000..d021c573d3b9f6794c12d754fa85ab818d6a2cf2 --- /dev/null +++ b/app/templates/password_reset_done.html @@ -0,0 +1,14 @@ + +{% extends 'app/base_reset.html' %} +{% block title %}Password reset complete{% endblock%} +{% block content %} + + +

Password reset complete

+

+

Your password has been set. You may go ahead and log in now.

+ +Log in + + +{% endblock %} \ No newline at end of file diff --git a/app/templates/password_reset_form.html b/app/templates/password_reset_form.html new file mode 100644 index 0000000000000000000000000000000000000000..73e68f57f6785e250468678e82d7d7a2a87e4f16 --- /dev/null +++ b/app/templates/password_reset_form.html @@ -0,0 +1,17 @@ +{% extends 'app/base_reset.html' %} +{% block title %}Enter new password{% endblock%} +{% block content %} + + +

Enter new password

+

+ +
+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+ +{% endblock %} \ No newline at end of file diff --git a/app/templates/password_reset_sent.html b/app/templates/password_reset_sent.html new file mode 100644 index 0000000000000000000000000000000000000000..12542b5a335e1b0a400c28411f4e9a1c79c809b3 --- /dev/null +++ b/app/templates/password_reset_sent.html @@ -0,0 +1,14 @@ + +{% extends 'app/base_reset.html' %} +{% block title %}Password reset sent{% endblock%} +{% block content %} + + +

Password reset sent

+

+

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/app/urls.py b/app/urls.py index 4ee198a591b4ee549e3fe85397a55e6efde4c1df..9df11eb5fc440636480622cbb9bcf0dcd129adb3 100644 --- a/app/urls.py +++ b/app/urls.py @@ -45,4 +45,16 @@ urlpatterns = [ path("baca-nanti/", ReadLaterView.as_view(), name="read-later"), path("baca-nanti-toggle/", views.toggle_readlater, name="toggle-read-later"), path("stats/", StatisticsView.as_view(), name="stats"), + path("reset_password/", + auth_views.PasswordResetView.as_view(template_name="password_reset.html"), + name="reset_password"), + path("reset_password_sent/", + auth_views.PasswordResetDoneView.as_view(template_name="password_reset_sent.html"), + name="password_reset_done"), + path("reset///", + auth_views.PasswordResetConfirmView.as_view(template_name="password_reset_form.html"), + name="password_reset_confirm"), + path("reset_password_complete/", + auth_views.PasswordResetCompleteView.as_view(template_name="password_reset_done.html"), + name="password_reset_complete"), ] diff --git a/authentication/templates/login.html b/authentication/templates/login.html index 9fac8e20b8966e810ae5b4b87eb687e0ab88a7cc..e577a9969a799bef368c0deedc0146951c4a0bee 100644 --- a/authentication/templates/login.html +++ b/authentication/templates/login.html @@ -65,6 +65,10 @@ Belum mendaftar? klik di sini
+ + Lupa password? klik di sini + +
Ingin jadi kontributor? klik di sini