Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
8c45b5b9
Kaydet (Commit)
8c45b5b9
authored
May 28, 2017
tarafından
Boris Burkov
Kaydeden (comit)
Tim Graham
May 28, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added comments to contrib.sitemaps.index() view.
üst
c3e63811
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
views.py
django/contrib/sitemaps/views.py
+4
-1
No files found.
django/contrib/sitemaps/views.py
Dosyayı görüntüle @
8c45b5b9
...
...
@@ -27,14 +27,17 @@ def index(request, sitemaps,
req_protocol
=
request
.
scheme
req_site
=
get_current_site
(
request
)
sites
=
[]
sites
=
[]
# all sections' sitemap URLs
for
section
,
site
in
sitemaps
.
items
():
# For each section label, add links of all pages of its sitemap
# (usually generated by the `sitemap` view).
if
callable
(
site
):
site
=
site
()
protocol
=
req_protocol
if
site
.
protocol
is
None
else
site
.
protocol
sitemap_url
=
reverse
(
sitemap_url_name
,
kwargs
=
{
'section'
:
section
})
absolute_url
=
'
%
s://
%
s
%
s'
%
(
protocol
,
req_site
.
domain
,
sitemap_url
)
sites
.
append
(
absolute_url
)
# Add links to all pages of the sitemap.
for
page
in
range
(
2
,
site
.
paginator
.
num_pages
+
1
):
sites
.
append
(
'
%
s?p=
%
s'
%
(
absolute_url
,
page
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment