diff -ru django/contrib/sitemaps/views.py django.new/contrib/sitemaps/views.py
old
|
new
|
|
9 | 9 | current_site = Site.objects.get_current() |
10 | 10 | sites = [] |
11 | 11 | protocol = request.is_secure() and 'https' or 'http' |
| 12 | if callable(sitemaps): |
| 13 | sitemaps = sitemaps() |
12 | 14 | for section, site in sitemaps.items(): |
13 | 15 | if callable(site): |
14 | 16 | pages = site().paginator.num_pages |
… |
… |
|
24 | 26 | |
25 | 27 | def sitemap(request, sitemaps, section=None): |
26 | 28 | maps, urls = [], [] |
| 29 | if callable(sitemaps): |
| 30 | sitemaps = sitemaps() |
27 | 31 | if section is not None: |
28 | 32 | if section not in sitemaps: |
29 | 33 | raise Http404("No sitemap available for section: %r" % section) |