Ticket #10952: docs_auth.txt.patch

File docs_auth.txt.patch, 4.7 KB (added by Daniel Hepper, 16 years ago)
  • docs/topics/auth.txt

     
    835835          default to :file:`registration/password_change_done.html` if not
    836836          supplied.
    837837
    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)
    839839
    840     Allows a user to reset their password, and sends them the new password
    841     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.
    842842
    843843    **Optional arguments:**
    844844
     845        * ``is_admin_site``: This will default to ``False``.
    845846        * ``template_name``: The full name of a template to use for
    846847          displaying the password reset form. This will default to
    847848          :file:`registration/password_reset_form.html` if not supplied.
    848 
    849849        * ``email_template_name``: The full name of a template to use for
    850850          generating the e-mail with the new password. This will default to
    851851          :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``.
    852859
    853860    **Template context:**
    854861
    855862        * ``form``: The form for resetting the user's password.
    856863
    857 .. function:: views.password_reset_done
     864.. function:: views.password_reset_done(request[, template_name])
    858865
    859866    The page shown after a user has reset their password.
    860867
     
    864871          default to :file:`registration/password_reset_done.html` if not
    865872          supplied.
    866873
    867 .. function:: views.redirect_to_login
     874.. function:: views.redirect_to_login(next[, login_url, redirect_field_name])
    868875
    869876    Redirects to the login page, and then back to another URL after a
    870877    successful login.
     
    877884
    878885        * ``login_url``: The URL of the login page to redirect to. This will
    879886          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`.
    880890
    881891.. function:: password_reset_confirm(request[,uidb36, token, template_name, token_generator, set_password_form, post_reset_redirect])
    882892
     
    886896
    887897        * ``uidb36``: The user's id encoded in base 36. This will default to
    888898          ``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``.
    890901        * ``template_name``: The full name of a template to display the confirm
    891           password view. Default value is :file:`registration/password_reset_confirm.html`.
    892         * ``token_generator``: Instance of the class to check the password. This
    893           will default to ``default_token_generator``, it's an instance of
     902          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
    894905          ``django.contrib.auth.tokens.PasswordResetTokenGenerator``.
    895         * ``set_password_form``: Form that will use to set the password. This will
    896           default to ``SetPasswordForm``.
    897         * ``post_reset_redirect``: URL to redirect after the password reset
     906        * ``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
    898909          done. This will default to ``None``.
    899910
    900911.. function:: password_reset_complete(request[,template_name])
    901912
    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.
    903914
    904915   **Optional arguments:**
    905916
     
    929940
    930941.. class:: PasswordResetForm
    931942
    932     A form for resetting a user's password and e-mailing the new password to
    933     them.
     943    A form for generating and e-mailing a one-use only link to reset a user's
     944    password.
    934945
    935946.. class:: UserCreationForm
    936947
Back to Top