#30817: Document that Sitemap.items() can return an iterable.
--------------------------------------+------------------------------------
     Reporter:  Chris Jerdonek        |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:  sitemap               |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  1                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by felixxm):

 * stage:  Unreviewed => Accepted


Comment:

 `Sitemap.items()` can return not only a `QuerySet` or `list` but also
 `tuple` or any other sliceable object with a `count()` or `__len__()`
 method, however I don't think that we need to be so specific here. There
 is also a `GenericSitemap` that allows you to create a sitemap by passing
 it a dictionary which has to contain a `queryset` entry. I would suggest
 to change `list` to a sequence, e.g.
 {{{
 A method that returns a :term:`sequence` of objects.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30817#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.967df9f0d0687af04ea56b79c83cbd85%40djangoproject.com.

Reply via email to