- Timestamp:
- 06/17/07 17:18:54 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/per-object-permissions/docs/generic_views.txt
r4242 r5488 45 45 (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/$', 'archive_month', info_dict), 46 46 (r'^(?P<year>\d{4})/$', 'archive_year', info_dict), 47 (r'^ /?$','archive_index', info_dict),47 (r'^$', 'archive_index', info_dict), 48 48 ) 49 49 … … 72 72 lambda that returns the QuerySet. 73 73 74 .. _database API docs: http://www.djangoproject.com/documentation/db_api/74 .. _database API docs: ../db-api/ 75 75 76 76 "Simple" generic views … … 98 98 context. By default, this is an empty dictionary. If a value in the 99 99 dictionary is callable, the generic view will call it 100 just before rendering the template. (**This is new in the 101 Django development version.**) 102 100 just before rendering the template. 101 102 * ``mimetype``: The MIME type to use for the resulting document. Defaults 103 to the value of the ``DEFAULT_CONTENT_TYPE`` setting. 104 103 105 **Example:** 104 106 … … 206 208 207 209 * ``<model_name>`` is your model's name in all lowercase. For a model 208 ``StaffMember``, that'd be ``staffmember``.210 ``StaffMember``, that'd be ``staffmember``. 209 211 210 212 * ``<app_label>`` is the right-most part of the full Python path to 211 your model's app. For example, if your model lives in212 ``apps/blog/models.py``, that'd be ``blog``.213 your model's app. For example, if your model lives in 214 ``apps/blog/models.py``, that'd be ``blog``. 213 215 214 216 **Template context:** … … 224 226 ``latest`` will be a list of the latest 10 objects in ``queryset``. 225 227 226 .. _RequestContext docs: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-djangocontext228 .. _RequestContext docs: ../templates_python/#subclassing-context-requestcontext 227 229 228 230 ``django.views.generic.date_based.archive_year`` … … 267 269 268 270 * ``template_object_name``: Designates the name of the template variable 269 to use in the template context. By default, this is ``'object'``. The270 view will append ``'_list'`` to the value of this parameter in271 determining the variable's name.271 to use in the template context. By default, this is ``'object'``. The 272 view will append ``'_list'`` to the value of this parameter in 273 determining the variable's name. 272 274 273 275 * ``make_object_list``: A boolean specifying whether to retrieve the full … … 361 363 362 364 * ``template_object_name``: Designates the name of the template variable 363 to use in the template context. By default, this is ``'object'``. The364 view will append ``'_list'`` to the value of this parameter in365 determining the variable's name.365 to use in the template context. By default, this is ``'object'``. The 366 view will append ``'_list'`` to the value of this parameter in 367 determining the variable's name. 366 368 367 369 * ``mimetype``: The MIME type to use for the resulting document. Defaults … … 442 444 443 445 * ``template_object_name``: Designates the name of the template variable 444 to use in the template context. By default, this is ``'object'``. The445 view will append ``'_list'`` to the value of this parameter in446 determining the variable's name.446 to use in the template context. By default, this is ``'object'``. The 447 view will append ``'_list'`` to the value of this parameter in 448 determining the variable's name. 447 449 448 450 * ``mimetype``: The MIME type to use for the resulting document. Defaults … … 527 529 528 530 * ``template_object_name``: Designates the name of the template variable 529 to use in the template context. By default, this is ``'object'``. The530 view will append ``'_list'`` to the value of this parameter in531 determining the variable's name.531 to use in the template context. By default, this is ``'object'``. The 532 view will append ``'_list'`` to the value of this parameter in 533 determining the variable's name. 532 534 533 535 * ``mimetype``: The MIME type to use for the resulting document. Defaults … … 639 641 640 642 * ``template_object_name``: Designates the name of the template variable 641 to use in the template context. By default, this is ``'object'``.643 to use in the template context. By default, this is ``'object'``. 642 644 643 645 * ``mimetype``: The MIME type to use for the resulting document. Defaults … … 687 689 displayed per page. If this is given, the view will paginate objects with 688 690 ``paginate_by`` objects per page. The view will expect either a ``page`` 689 query string parameter (via ``GET``) containing a zero-indexed page691 query string parameter (via ``GET``) containing a 1-based page 690 692 number, or a ``page`` variable specified in the URLconf. See 691 693 "Notes on pagination" below. … … 711 713 712 714 * ``template_object_name``: Designates the name of the template variable 713 to use in the template context. By default, this is ``'object'``. The714 view will append ``'_list'`` to the value of this parameter in715 determining the variable's name.715 to use in the template context. By default, this is ``'object'``. The 716 view will append ``'_list'`` to the value of this parameter in 717 determining the variable's name. 716 718 717 719 * ``mimetype``: The MIME type to use for the resulting document. Defaults … … 752 754 753 755 * ``previous``: The previous page number, as an integer. This is 1-based. 756 757 * `last_on_page`: The number of the 758 last result on the current page. This is 1-based. 759 760 * `first_on_page`: The number of the 761 first result on the current page. This is 1-based. 754 762 755 763 * ``pages``: The total number of pages, as an integer. … … 825 833 826 834 * ``template_object_name``: Designates the name of the template variable 827 to use in the template context. By default, this is ``'object'``.835 to use in the template context. By default, this is ``'object'``. 828 836 829 837 * ``mimetype``: The MIME type to use for the resulting document. Defaults … … 917 925 about using ``FormWrapper`` objects in templates. 918 926 919 .. _authentication system: http://www.djangoproject.com/documentation/authentication/920 .. _manipulator and formfield documentation: http://www.djangoproject.com/documentation/forms/927 .. _authentication system: ../authentication/ 928 .. _manipulator and formfield documentation: ../forms/ 921 929 922 930 ``django.views.generic.create_update.update_object`` … … 974 982 975 983 * ``template_object_name``: Designates the name of the template variable 976 to use in the template context. By default, this is ``'object'``.984 to use in the template context. By default, this is ``'object'``. 977 985 978 986 **Template name:** … … 1055 1063 1056 1064 * ``template_object_name``: Designates the name of the template variable 1057 to use in the template context. By default, this is ``'object'``.1065 to use in the template context. By default, this is ``'object'``. 1058 1066 1059 1067 **Template name:**
