From e1e858beaa7f4770d984146a1657affae0ef26cf Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Thu, 29 Jun 2023 21:43:34 +0000 Subject: [PATCH] Created password change form --- src/apps/account/templates/password.html | 16 ++++++++++++++++ src/apps/account/views.py | 1 + 2 files changed, 17 insertions(+) create mode 100644 src/apps/account/templates/password.html diff --git a/src/apps/account/templates/password.html b/src/apps/account/templates/password.html new file mode 100644 index 0000000..434c688 --- /dev/null +++ b/src/apps/account/templates/password.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% load static %} +{% block title %}{{ title }}{% endblock %} +{% block meta %}{% endblock %} +{% block content %} +
+
+

Change password

+ {% csrf_token %} + {{ form }} + +
+
+{% endblock %} diff --git a/src/apps/account/views.py b/src/apps/account/views.py index 470136b..fc6ba2e 100644 --- a/src/apps/account/views.py +++ b/src/apps/account/views.py @@ -1,4 +1,5 @@ from django.contrib.auth import authenticate, login +from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import get_object_or_404, redirect, render from django.views.generic import ListView