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
e690eb40
Kaydet (Commit)
e690eb40
authored
Ara 01, 2016
tarafından
Anton Bazhanov
Kaydeden (comit)
Tim Graham
Ara 01, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #27505 -- Made Paginator's exception messsages translatable.
üst
48826aa5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
paginator.py
django/core/paginator.py
+4
-3
No files found.
django/core/paginator.py
Dosyayı görüntüle @
e690eb40
...
...
@@ -4,6 +4,7 @@ from math import ceil
from
django.utils
import
six
from
django.utils.functional
import
cached_property
from
django.utils.translation
import
ugettext_lazy
as
_
class
UnorderedObjectListWarning
(
RuntimeWarning
):
...
...
@@ -39,14 +40,14 @@ class Paginator(object):
try
:
number
=
int
(
number
)
except
(
TypeError
,
ValueError
):
raise
PageNotAnInteger
(
'That page number is not an integer'
)
raise
PageNotAnInteger
(
_
(
'That page number is not an integer'
)
)
if
number
<
1
:
raise
EmptyPage
(
'That page number is less than 1'
)
raise
EmptyPage
(
_
(
'That page number is less than 1'
)
)
if
number
>
self
.
num_pages
:
if
number
==
1
and
self
.
allow_empty_first_page
:
pass
else
:
raise
EmptyPage
(
'That page contains no results'
)
raise
EmptyPage
(
_
(
'That page contains no results'
)
)
return
number
def
page
(
self
,
number
):
...
...
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