diff --git a/access_controller/urls.py b/access_controller/urls.py index f6a6754..63dc19f 100644 --- a/access_controller/urls.py +++ b/access_controller/urls.py @@ -14,6 +14,7 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin +from django.contrib.auth import views from django.urls import path, include from main.views import main_page, profile_page, CustomRegistrationView, CustomLoginView, registration_error @@ -36,8 +37,7 @@ urlpatterns = [ path('accounts/', include('django_registration.backends.activation.urls')), path('control/', AdminPageView.as_view(), name='control'), path('statistic/', statistic_page, name='statistic'), - ] - +] # Django REST urlpatterns += [ diff --git a/main/templates/pages/profile.html b/main/templates/pages/profile.html index 1dd6005..5cd8420 100644 --- a/main/templates/pages/profile.html +++ b/main/templates/pages/profile.html @@ -31,6 +31,7 @@ alt="Нет изображения" > + Сменить пароль
Имя пользователя {{ profile.name }}
diff --git a/main/templates/registration/password_change_done.html b/main/templates/registration/password_change_done.html new file mode 100644 index 0000000..59870fb --- /dev/null +++ b/main/templates/registration/password_change_done.html @@ -0,0 +1,12 @@ +{% extends "base/base.html" %} +{% load static %} + +{% block title %}Пароль успешно изменен{% endblock title %} + +{% block heading %}Пароль успешно изменен{% endblock %} + +{% block content %} +
+

Ваш пароль был изменен.

+
+{% endblock content %} diff --git a/main/templates/registration/password_change_form.html b/main/templates/registration/password_change_form.html new file mode 100644 index 0000000..5348ed9 --- /dev/null +++ b/main/templates/registration/password_change_form.html @@ -0,0 +1,14 @@ +{% extends "base/base.html" %} +{% load static %} + +{% block title %}Изменение пароля{% endblock title %} + +{% block heading %}Сменить пароль{% endblock %} + +{% block content %} +
+ {% csrf_token %} + {{ form.as_p }} + +
+{% endblock content %}