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
d896809a
Kaydet (Commit)
d896809a
authored
Eki 02, 2017
tarafından
Mariusz Felisiak
Kaydeden (comit)
Tim Graham
Eki 02, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #23919 -- Removed unneeded float()/int() calls.
üst
f0ffa3f4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
humanize.py
django/contrib/humanize/templatetags/humanize.py
+1
-1
paginator.py
django/core/paginator.py
+1
-1
__init__.py
django/db/models/fields/__init__.py
+1
-1
defaulttags.py
django/template/defaulttags.py
+1
-1
tests.py
tests/delete/tests.py
+1
-1
No files found.
django/contrib/humanize/templatetags/humanize.py
Dosyayı görüntüle @
d896809a
...
...
@@ -130,7 +130,7 @@ def intword(value):
for
exponent
,
converters
in
intword_converters
:
large_number
=
10
**
exponent
if
value
<
large_number
*
1000
:
new_value
=
value
/
float
(
large_number
)
new_value
=
value
/
large_number
return
_check_for_i18n
(
new_value
,
*
converters
(
new_value
))
return
value
...
...
django/core/paginator.py
Dosyayı görüntüle @
d896809a
...
...
@@ -95,7 +95,7 @@ class Paginator:
if
self
.
count
==
0
and
not
self
.
allow_empty_first_page
:
return
0
hits
=
max
(
1
,
self
.
count
-
self
.
orphans
)
return
int
(
ceil
(
hits
/
float
(
self
.
per_page
))
)
return
ceil
(
hits
/
self
.
per_page
)
@property
def
page_range
(
self
):
...
...
django/db/models/fields/__init__.py
Dosyayı görüntüle @
d896809a
...
...
@@ -1631,7 +1631,7 @@ class DurationField(Field):
if
value
is
None
:
return
None
# Discard any fractional microseconds due to floating point arithmetic.
return
int
(
round
(
value
.
total_seconds
()
*
1000000
)
)
return
round
(
value
.
total_seconds
()
*
1000000
)
def
get_db_converters
(
self
,
connection
):
converters
=
[]
...
...
django/template/defaulttags.py
Dosyayı görüntüle @
d896809a
...
...
@@ -486,7 +486,7 @@ class WidthRatioNode(Node):
value
=
float
(
value
)
max_value
=
float
(
max_value
)
ratio
=
(
value
/
max_value
)
*
max_width
result
=
str
(
int
(
round
(
ratio
)
))
result
=
str
(
round
(
ratio
))
except
ZeroDivisionError
:
return
'0'
except
(
ValueError
,
TypeError
,
OverflowError
):
...
...
tests/delete/tests.py
Dosyayı görüntüle @
d896809a
...
...
@@ -325,7 +325,7 @@ class DeletionTests(TestCase):
# Calculate the number of queries needed.
batch_size
=
connection
.
ops
.
bulk_batch_size
([
'pk'
],
objs
)
# The related fetches are done in batches.
batches
=
int
(
ceil
(
float
(
len
(
objs
))
/
batch_size
)
)
batches
=
ceil
(
len
(
objs
)
/
batch_size
)
# One query for Avatar.objects.all() and then one related fast delete for
# each batch.
fetches_to_mem
=
1
+
batches
...
...
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