Django

Code

Show
Ignore:
Timestamp:
07/18/08 18:54:34 (6 months ago)
Author:
brosner
Message:

Merged the newforms-admin branch into trunk.

This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets?
and Media definitions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/authentication.txt

    r7619 r7967  
    517517template context variables: 
    518518 
    519     * ``form``: A ``FormWrapper`` object representing the login form. See the 
    520       `forms documentation`_ for more on ``FormWrapper`` objects. 
     519    * ``form``: A ``Form`` object representing the login form. See the 
     520      `newforms documentation`_ for more on ``Form`` objects. 
    521521    * ``next``: The URL to redirect to after successful login. This may contain 
    522522      a query string, too. 
     
    542542    {% block content %} 
    543543 
    544     {% if form.has_errors %} 
     544    {% if form.errors %} 
    545545    <p>Your username and password didn't match. Please try again.</p> 
    546546    {% endif %} 
     
    548548    <form method="post" action="."> 
    549549    <table> 
    550     <tr><td><label for="id_username">Username:</label></td><td>{{ form.username }}</td></tr> 
    551     <tr><td><label for="id_password">Password:</label></td><td>{{ form.password }}</td></tr> 
     550    <tr><td>{{ form.username.label_tag }}</td><td>{{ form.username }}</td></tr> 
     551    <tr><td>{{ form.password.label_tag }}</td><td>{{ form.password }}</td></tr> 
    552552    </table> 
    553553 
     
    558558    {% endblock %} 
    559559 
    560 .. _forms documentation: ../forms/ 
     560.. _newforms documentation: ../newforms/ 
    561561.. _site framework docs: ../sites/ 
    562562 
     
    678678      will default to ``settings.LOGIN_URL`` if not supplied. 
    679679 
    680 Built-in manipulators 
    681 --------------------- 
     680Built-in forms 
     681-------------- 
     682 
     683**New in Django development version.** 
    682684 
    683685If you don't want to use the built-in views, but want the convenience 
    684 of not having to write manipulators for this functionality, the 
    685 authentication system provides several built-in manipulators: 
    686  
    687     * ``django.contrib.auth.forms.AdminPasswordChangeForm``: A 
    688       manipulator used in the admin interface to change a user's 
    689       password. 
    690  
    691     * ``django.contrib.auth.forms.AuthenticationForm``: A manipulator 
    692       for logging a user in. 
    693  
    694     * ``django.contrib.auth.forms.PasswordChangeForm``: A manipulator 
    695       for allowing a user to change their password. 
    696  
    697     * ``django.contrib.auth.forms.PasswordResetForm``: A manipulator 
    698       for resetting a user's password and emailing the new password to 
    699       them. 
    700  
    701     * ``django.contrib.auth.forms.UserCreationForm``: A manipulator 
    702       for creating a new user. 
     686of not having to write forms for this functionality, the authentication 
     687system provides several built-in forms: 
     688 
     689    * ``django.contrib.auth.forms.AdminPasswordChangeForm``: A form used in 
     690      the admin interface to change a user's password. 
     691 
     692    * ``django.contrib.auth.forms.AuthenticationForm``: A form for logging a 
     693      user in. 
     694 
     695    * ``django.contrib.auth.forms.PasswordChangeForm``: A form for allowing a 
     696      user to change their password. 
     697 
     698    * ``django.contrib.auth.forms.PasswordResetForm``: A form for resetting a 
     699      user's password and emailing the new password to them. 
     700 
     701    * ``django.contrib.auth.forms.UserCreationForm``: A form for creating a 
     702      new user. 
    703703 
    704704Limiting access to logged-in users that pass a test