ユーザーがパスワードを変更できるようにしたいのですが、django-in-built password_change 関数を使用しています。デフォルトの template-name と password_change_form を使用したいのですが、post_change_redirect 引数を自分の Web サイトに固有のものに変更したいと考えています。
残りを同じに保ちながら、それだけを変更するにはどうすればよいですか?
Django ドキュメントから:
password_change(request[, template_name, post_change_redirect, password_change_form])
Allows a user to change their password.
URL name: password_change
Optional arguments:
template_name: The full name of a template to use for displaying the password change form. Defaults to registration/password_change_form.html if not supplied.
post_change_redirect: The URL to redirect to after a successful password change.
password_change_form: A custom "change password" form which must accept a user keyword argument. The form is responsible for actually changing the user's password. Defaults to PasswordChangeForm.
Template context:
form: パスワード変更フォーム (上の password_change_form を参照)。
いくつかのガイダンスが必要です。ありがとう。