Ticket #10952: docs_auth.txt.patch
File docs_auth.txt.patch, 4.7 KB (added by , 16 years ago) |
---|
-
docs/topics/auth.txt
835 835 default to :file:`registration/password_change_done.html` if not 836 836 supplied. 837 837 838 .. function:: views.password_reset 838 .. function:: views.password_reset(request[, is_admin_site, template_name, email_template_name, password_reset_form, token_generator, post_reset_redirect) 839 839 840 Allows a user to reset their password, and sends them the new password841 in an e-mail.840 Generates a one-use only link for resetting the password and sends it 841 the user in an e-mail. 842 842 843 843 **Optional arguments:** 844 844 845 * ``is_admin_site``: This will default to ``False``. 845 846 * ``template_name``: The full name of a template to use for 846 847 displaying the password reset form. This will default to 847 848 :file:`registration/password_reset_form.html` if not supplied. 848 849 849 * ``email_template_name``: The full name of a template to use for 850 850 generating the e-mail with the new password. This will default to 851 851 :file:`registration/password_reset_email.html` if not supplied. 852 * ``password_reset_form``: Form that will be used to generate and 853 send the one-use only link. This will default to ``PasswordResetForm``. 854 * ``token_generator``: Instance of the class to check the password. This 855 will default to ``default_token_generator``, which is an instance of 856 :class:`~django.contrib.auth.tokens.PasswordResetTokenGenerator`. 857 * ``post_reset_redirect``: URL to redirect to after the password reset 858 done. This will default to ``None``. 852 859 853 860 **Template context:** 854 861 855 862 * ``form``: The form for resetting the user's password. 856 863 857 .. function:: views.password_reset_done 864 .. function:: views.password_reset_done(request[, template_name]) 858 865 859 866 The page shown after a user has reset their password. 860 867 … … 864 871 default to :file:`registration/password_reset_done.html` if not 865 872 supplied. 866 873 867 .. function:: views.redirect_to_login 874 .. function:: views.redirect_to_login(next[, login_url, redirect_field_name]) 868 875 869 876 Redirects to the login page, and then back to another URL after a 870 877 successful login. … … 877 884 878 885 * ``login_url``: The URL of the login page to redirect to. This will 879 886 default to :setting:`settings.LOGIN_URL <LOGIN_URL>` if not supplied. 887 * ``redirect_field_name``: The name of the URL parameter that is used 888 to pass the URL to redirect to. This will default to the value of 889 :data:`django.contrib.auth.REDIRECT_FIELD_NAME`. 880 890 881 891 .. function:: password_reset_confirm(request[,uidb36, token, template_name, token_generator, set_password_form, post_reset_redirect]) 882 892 … … 886 896 887 897 * ``uidb36``: The user's id encoded in base 36. This will default to 888 898 ``None``. 889 * ``token``: Token to check that the password is valid. This will default to ``None``. 899 * ``token``: Token to check that the password is valid. This will 900 default to ``None``. 890 901 * ``template_name``: The full name of a template to display the confirm 891 passwordview. Default value is :file:`registration/password_reset_confirm.html`.892 * ``token_generator``: Instance of the class to check the password. This893 will default to ``default_token_generator``, it's an instance of902 view. Default value is :file:`registration/password_reset_confirm.html`. 903 * ``token_generator``: Instance of the class to check the password. 904 This will default to ``default_token_generator``, it's an instance of 894 905 ``django.contrib.auth.tokens.PasswordResetTokenGenerator``. 895 * ``set_password_form``: Form that will use to set the password. This will896 default to ``SetPasswordForm``.897 * ``post_reset_redirect``: URL to redirect after the password reset906 * ``set_password_form``: Form that will be used to set the password. 907 This will default to ``SetPasswordForm``. 908 * ``post_reset_redirect``: URL to redirect to after the password reset 898 909 done. This will default to ``None``. 899 910 900 911 .. function:: password_reset_complete(request[,template_name]) 901 912 902 Presents a view that informs that the password has been changed very well.913 Presents a view that informs that the password reset has been completed. 903 914 904 915 **Optional arguments:** 905 916 … … 929 940 930 941 .. class:: PasswordResetForm 931 942 932 A form for resetting a user's password and e-mailing the new password to933 them.943 A form for generating and e-mailing a one-use only link to reset a user's 944 password. 934 945 935 946 .. class:: UserCreationForm 936 947