From bf0f6ec3b490fb0a9a44881f7151b3afb4ab4733 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 30 Nov 2005 22:03:50 +0000 Subject: 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 --- docs/generic_views.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'docs') 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. -- cgit v1.3