Changeset 7967 for django/trunk/docs/authentication.txt
- Timestamp:
- 07/18/08 18:54:34 (6 months ago)
- Files:
-
- django/trunk/docs/authentication.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/authentication.txt
r7619 r7967 517 517 template context variables: 518 518 519 * ``form``: A ``Form Wrapper`` object representing the login form. See the520 ` 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. 521 521 * ``next``: The URL to redirect to after successful login. This may contain 522 522 a query string, too. … … 542 542 {% block content %} 543 543 544 {% if form. has_errors %}544 {% if form.errors %} 545 545 <p>Your username and password didn't match. Please try again.</p> 546 546 {% endif %} … … 548 548 <form method="post" action="."> 549 549 <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> 552 552 </table> 553 553 … … 558 558 {% endblock %} 559 559 560 .. _ forms documentation: ../forms/560 .. _newforms documentation: ../newforms/ 561 561 .. _site framework docs: ../sites/ 562 562 … … 678 678 will default to ``settings.LOGIN_URL`` if not supplied. 679 679 680 Built-in manipulators 681 --------------------- 680 Built-in forms 681 -------------- 682 683 **New in Django development version.** 682 684 683 685 If 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. 686 of not having to write forms for this functionality, the authentication 687 system 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. 703 703 704 704 Limiting access to logged-in users that pass a test
