diff --git a/community_backup/community_backup/urls.py b/community_backup/community_backup/urls.py index f8b5762..256fd45 100644 --- a/community_backup/community_backup/urls.py +++ b/community_backup/community_backup/urls.py @@ -17,9 +17,22 @@ Including another URLconf from django.contrib import admin from django.urls import path, include +from django.contrib.auth import views as auth_views urlpatterns = [ path("", include("webui.urls")), path("admin/", admin.site.urls), - path("accounts/", include("django.contrib.auth.urls")) + # only import the views from the auth package that we actually use + path("accounts/login/", auth_views.LoginView.as_view(), name="login"), + path("accounts/logout/", auth_views.LogoutView.as_view(), name="logout"), + path( + "accounts/password_change/", + auth_views.PasswordChangeView.as_view(), + name="password_change", + ), + path( + "accounts/password_change/done/", + auth_views.PasswordChangeDoneView.as_view(), + name="password_change_done", + ), ] diff --git a/community_backup/webui/templates/delete.html b/community_backup/webui/templates/delete.html index ffd0506..b57ba9a 100644 --- a/community_backup/webui/templates/delete.html +++ b/community_backup/webui/templates/delete.html @@ -2,6 +2,9 @@ {% load crispy_forms_tags %} {% block content %} +

Delete your Account

+ +
{% if next %} {% if user.is_authenticated %} @@ -15,8 +18,9 @@
{% csrf_token %} {{ form|crispy }} - - + +
+
{% endblock %} diff --git a/community_backup/webui/templates/registration/password_change_done.html b/community_backup/webui/templates/registration/password_change_done.html new file mode 100644 index 0000000..43f3869 --- /dev/null +++ b/community_backup/webui/templates/registration/password_change_done.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block content %} + +

Password change successful

+ +
+ Your password was changed successfully. +
+ +{% endblock %} diff --git a/community_backup/webui/templates/registration/password_change_form.html b/community_backup/webui/templates/registration/password_change_form.html new file mode 100644 index 0000000..e654f6a --- /dev/null +++ b/community_backup/webui/templates/registration/password_change_form.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% load crispy_forms_tags %} + +{% block content %} + +

Change your password

+ +
+ +
+ {% csrf_token %} + {{ form|crispy }} + +
+
+ +{% endblock %}