diff --git a/CineSync/templates/users/login.html b/CineSync/templates/users/login.html
index 9c147bc..273e487 100644
--- a/CineSync/templates/users/login.html
+++ b/CineSync/templates/users/login.html
@@ -28,9 +28,6 @@
{% endcomment %}
- Восстановить
- пароль
Создать
аккаунт
diff --git a/CineSync/templates/users/password_change.html b/CineSync/templates/users/password_change.html
new file mode 100644
index 0000000..0b0b715
--- /dev/null
+++ b/CineSync/templates/users/password_change.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+{% load static %}
+{% block title %}
+Изменить пароль
+{% endblock title %}
+{% block content %}
+
+
+
Смена пароля
+ {% include "includes/form.html" with form=form %}
+
+{% endblock %}
diff --git a/CineSync/templates/users/password_change_done.html b/CineSync/templates/users/password_change_done.html
new file mode 100644
index 0000000..fc9b0bf
--- /dev/null
+++ b/CineSync/templates/users/password_change_done.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+{% load static %}
+{% block title %}
+Смена пароля
+{% endblock %}
+{% block content %}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/CineSync/templates/users/profile.html b/CineSync/templates/users/profile.html
index 99fed6d..960e093 100644
--- a/CineSync/templates/users/profile.html
+++ b/CineSync/templates/users/profile.html
@@ -46,6 +46,6 @@
Выйти
- Сменить пароль
+ Сменить пароль
{% endblock content %}
\ No newline at end of file
diff --git a/CineSync/users/forms.py b/CineSync/users/forms.py
index 37a7d99..adaad74 100644
--- a/CineSync/users/forms.py
+++ b/CineSync/users/forms.py
@@ -4,7 +4,6 @@ from django.forms import DateInput, ModelForm
from django.contrib.auth.forms import (
AuthenticationForm,
PasswordChangeForm,
- PasswordResetForm,
SetPasswordForm,
UserChangeForm,
UserCreationForm,
@@ -45,16 +44,6 @@ class CustomSetPasswordForm(SetPasswordForm):
fields = ('old_password', 'new_password', 'approve_new_password')
-class CustomPasswordResetForm(PasswordResetForm):
- def __init__(self, *args, **kwargs) -> None:
- super().__init__(*args, **kwargs)
- for field in self.visible_fields():
- field.field.widget.attrs['class'] = 'form-control'
-
- class Meta(forms.ModelForm):
- fields = ('old_password', 'new_password', 'approve_new_password')
-
-
class SignUpForm(UserCreationForm):
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
diff --git a/CineSync/users/urls.py b/CineSync/users/urls.py
index 2ae37e0..95ac139 100644
--- a/CineSync/users/urls.py
+++ b/CineSync/users/urls.py
@@ -6,7 +6,6 @@ from django.urls import reverse_lazy
from users.forms import (
CustomAuthenticationForm,
CustomPasswordChangeForm,
- CustomPasswordResetForm,
CustomSetPasswordForm,
)
from users.views import profile, signup
@@ -48,39 +47,6 @@ urlpatterns = [
),
name='password_change_done',
),
- path(
- 'password_reset/',
- views.PasswordResetView.as_view(
- template_name='users/password_reset.html',
- email_template_name='users/password_reset_email.html',
- form_class=CustomPasswordResetForm,
- success_url=reverse_lazy('users:password_reset_done'),
- ),
- name='password_reset',
- ),
- path(
- 'password_reset/done/',
- views.PasswordResetDoneView.as_view(
- template_name='users/password_reset_done.html',
- ),
- name='password_reset_done',
- ),
- path(
- 'password_reset_confirm///',
- views.PasswordResetConfirmView.as_view(
- form_class=CustomSetPasswordForm,
- template_name='users/password_reset_confirm.html',
- success_url=reverse_lazy('users:password_reset_confirm_complete'),
- ),
- name='password_reset_confirm',
- ),
- path(
- 'password_reset_complete/done/',
- views.PasswordResetCompleteView.as_view(
- template_name='users/password_reset_complete.html',
- ),
- name='password_reset_complete',
- ),
path('signup/', signup, name='signup'),
path('profile/', login_required(profile), name='profile'),
]