Commits

adr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 26824bd

magic-removal: Fixed #1700 -- Updated docs/generic_views.txt to reflect magic-removal. Thanks, Malcolm and asmodai

  • Participants
  • Parent commits fcd8d15
  • Branches magic-removal

Comments (0)

Files changed (1)

File docs/generic_views.txt

     from django_website.apps.blog.models import Entry
 
     info_dict = {
-        'model': Entry,
+        'queryset': Entry.objects.all(),
         'date_field': 'pub_date',
     }
 
        (r'^/?$',                                                                  'archive_index', info_dict),
     )
 
-As you can see, this URLconf defines a few options in ``info_dict``. ``'model'``
-tells the generic view which model to use (``Entry``, in this case), as well as
-some extra information.
+As you can see, this URLconf defines a few options in ``info_dict``.
+``'queryset'`` tells the generic view which objects to use (all of the
+``Entry`` objects, in this case), as well as some extra information (it is
+used by the view to determine the model being used, for example).
 
 Documentation of each generic view follows, along with a list of all keyword
 arguments that a generic view expects. Remember that as in the example above,
 arguments may either come from the URL pattern (as ``month``, ``day``,
 ``year``, etc. do above) or from the additional-information dictionary (as for
-``model``, ``date_field``, etc.).
+``queryset``, ``date_field``, etc.).
 
-Most generic views require the ``model`` key, which is your model class (*not*
-an instance of the class).
+Most generic views require the ``queryset`` key, which is a ``QuerySet``
+instance (*not* an instance of the class); see the `database API docs`_
+for more information about query sets.
 
 Using "simple" generic views
 ============================
             ``template_object_name`` parameter. (See above.) For example, if
             ``template_object_name`` is ``foo``, the variable will be ``foo``
             instead of ``object``.
+