mirror of
https://github.com/django/django.git
synced 2024-12-23 09:36:06 +00:00
Fixed typos in generic-views documentation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a90e9f43db
commit
b7e226d8b8
@ -77,15 +77,15 @@ def object_detail(request, app_label, module_name, object_id=None, slug=None,
|
||||
"""
|
||||
Generic list of objects.
|
||||
|
||||
Templates: ``<app_label>/<module_name>_list``
|
||||
Templates: ``<app_label>/<module_name>_detail``
|
||||
Context:
|
||||
object
|
||||
the object (whoa!)
|
||||
the object
|
||||
"""
|
||||
mod = models.get_module(app_label, module_name)
|
||||
lookup_kwargs = {}
|
||||
if object_id:
|
||||
lookup_kwargs['%s__exact' % mod.Klass._meta.pk.name] = object_id
|
||||
lookup_kwargs['pk'] = object_id
|
||||
elif slug and slug_field:
|
||||
lookup_kwargs['%s__exact' % slug_field] = slug
|
||||
else:
|
||||
|
@ -193,12 +193,13 @@ The date-based generic functions are:
|
||||
Using list/detail generic views
|
||||
===============================
|
||||
|
||||
The list-detail generic views (in the ``django.views.generic.list_detail``
|
||||
module) are similar to the data-based ones, except the list-detail views simply
|
||||
have two views: a list of objects, and an individual object page.
|
||||
The list-detail generic-view framework (in the
|
||||
``django.views.generic.list_detail`` module) is similar to the date-based one,
|
||||
except the former simply has two views: a list of objects and an individual
|
||||
object page.
|
||||
|
||||
All these views take the same three optional arguments as the date-based ones
|
||||
(and they obviously do not accept or require the date field argument).
|
||||
-- and, clearly, they don't accept the ``date_field`` argument.
|
||||
|
||||
Individual views are:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user