Add password change page
This commit is contained in:
parent
1bb951dcda
commit
5c3801c317
@ -14,6 +14,7 @@ Including another URLconf
|
|||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from django.contrib.auth import views
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
from main.views import main_page, profile_page, CustomRegistrationView, CustomLoginView, registration_error
|
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('accounts/', include('django_registration.backends.activation.urls')),
|
||||||
path('control/', AdminPageView.as_view(), name='control'),
|
path('control/', AdminPageView.as_view(), name='control'),
|
||||||
path('statistic/', statistic_page, name='statistic'),
|
path('statistic/', statistic_page, name='statistic'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
# Django REST
|
# Django REST
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
alt="Нет изображения"
|
alt="Нет изображения"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<a href="{%url 'password_change' %}">Сменить пароль</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h5><span class="badge bg-secondary text-light">Имя пользователя</span> {{ profile.name }}</h5>
|
<h5><span class="badge bg-secondary text-light">Имя пользователя</span> {{ profile.name }}</h5>
|
||||||
|
12
main/templates/registration/password_change_done.html
Normal file
12
main/templates/registration/password_change_done.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% extends "base/base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block title %}Пароль успешно изменен{% endblock title %}
|
||||||
|
|
||||||
|
{% block heading %}Пароль успешно изменен{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div>
|
||||||
|
<h4>Ваш пароль был изменен.</h4>
|
||||||
|
</div>
|
||||||
|
{% endblock content %}
|
14
main/templates/registration/password_change_form.html
Normal file
14
main/templates/registration/password_change_form.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{% extends "base/base.html" %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block title %}Изменение пароля{% endblock title %}
|
||||||
|
|
||||||
|
{% block heading %}Сменить пароль{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form.as_p }}
|
||||||
|
<input type="submit" value="Сменить" class="btn btn-success">
|
||||||
|
</form>
|
||||||
|
{% endblock content %}
|
Loading…
x
Reference in New Issue
Block a user