diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-11-30 22:03:50 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-11-30 22:03:50 +0000 |
| commit | bf0f6ec3b490fb0a9a44881f7151b3afb4ab4733 (patch) | |
| tree | f02a13edbdda405ec9c4b72e94494b7b80485f2f /docs/generic_views.txt | |
| parent | 0c5cf18e1d6bc8d24b724e9fc779f4ecf8ca46d1 (diff) | |
Added allow_empty hook to archive_index date-based generic view.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/generic_views.txt')
| -rw-r--r-- | docs/generic_views.txt | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/docs/generic_views.txt b/docs/generic_views.txt index 16a3c2d5bc..d196d2cf96 100644 --- a/docs/generic_views.txt +++ b/docs/generic_views.txt @@ -135,9 +135,21 @@ arguments: The date-based generic functions are: ``archive_index`` - A top-level index page showing the "latest" objects. Has an optional - argument, ``num_latest``, which is the number of items to display on the - page (defaults to 15). + A top-level index page showing the "latest" objects. + + Takes the following optional arguments: + + ======================= ================================================= + Argument Description + ======================= ================================================= + ``num_latest`` The number of items to display on the page. + Defaults to 15. + + ``allow_empty`` **New in Django development version.** + If ``False`` and there are no objects to display, + the view will raise a 404 instead of displaying + an empty index page. ``False`` is default. + ======================= ================================================= Uses the template ``app_label/module_name_archive`` by default. |
