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
504e7782
Kaydet (Commit)
504e7782
authored
May 05, 2017
tarafından
Raphael Michel
Kaydeden (comit)
Tim Graham
May 05, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #22654 -- Added additional tests and amended release note.
üst
d66378a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
2.0.txt
docs/releases/2.0.txt
+12
-4
tests.py
tests/i18n/tests.py
+13
-0
No files found.
docs/releases/2.0.txt
Dosyayı görüntüle @
504e7782
...
@@ -163,10 +163,6 @@ Forms
...
@@ -163,10 +163,6 @@ Forms
HTML attributes for the ``DateInput`` and ``TimeInput`` (or hidden)
HTML attributes for the ``DateInput`` and ``TimeInput`` (or hidden)
subwidgets.
subwidgets.
* :class:`~django.forms.FloatField` and :class:`~django.forms.DecimalField`
now handle :setting:`DECIMAL_SEPARATOR` and :setting:`THOUSAND_SEPARATOR`
correctly when :setting:`USE_L10N` is off.
Generic Views
Generic Views
~~~~~~~~~~~~~
~~~~~~~~~~~~~
...
@@ -311,6 +307,18 @@ Miscellaneous
...
@@ -311,6 +307,18 @@ Miscellaneous
* :class:`~django.views.generic.base.RedirectView` no longer silences
* :class:`~django.views.generic.base.RedirectView` no longer silences
``NoReverseMatch`` if the ``pattern_name`` doesn't exist.
``NoReverseMatch`` if the ``pattern_name`` doesn't exist.
* When :setting:`USE_L10N` is off, :class:`~django.forms.FloatField` and
:class:`~django.forms.DecimalField` now respect :setting:`DECIMAL_SEPARATOR`
and :setting:`THOUSAND_SEPARATOR` during validation. For example, with the
settings::
USE_L10N = False
USE_THOUSAND_SEPARATOR = True
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
an input of ``"1.345"`` is now converted to ``1345`` instead of ``1.345``.
.. _deprecated-features-2.0:
.. _deprecated-features-2.0:
Features deprecated in 2.0
Features deprecated in 2.0
...
...
tests/i18n/tests.py
Dosyayı görüntüle @
504e7782
...
@@ -874,6 +874,19 @@ class FormattingTests(SimpleTestCase):
...
@@ -874,6 +874,19 @@ class FormattingTests(SimpleTestCase):
# Suspicion that user entered dot as decimal separator (#22171)
# Suspicion that user entered dot as decimal separator (#22171)
self
.
assertEqual
(
sanitize_separators
(
'10.10'
),
'10.10'
)
self
.
assertEqual
(
sanitize_separators
(
'10.10'
),
'10.10'
)
with
self
.
settings
(
USE_L10N
=
False
,
DECIMAL_SEPARATOR
=
','
):
self
.
assertEqual
(
sanitize_separators
(
'1001,10'
),
'1001.10'
)
self
.
assertEqual
(
sanitize_separators
(
'1001.10'
),
'1001.10'
)
with
self
.
settings
(
USE_L10N
=
False
,
DECIMAL_SEPARATOR
=
','
,
USE_THOUSAND_SEPARATOR
=
True
,
THOUSAND_SEPARATOR
=
'.'
):
self
.
assertEqual
(
sanitize_separators
(
'1.001,10'
),
'1001.10'
)
self
.
assertEqual
(
sanitize_separators
(
'1001,10'
),
'1001.10'
)
self
.
assertEqual
(
sanitize_separators
(
'1001.10'
),
'1001.10'
)
self
.
assertEqual
(
sanitize_separators
(
'1,001.10'
),
'1.001.10'
)
# Invalid output
def
test_iter_format_modules
(
self
):
def
test_iter_format_modules
(
self
):
"""
"""
Tests the iter_format_modules function.
Tests the iter_format_modules function.
...
...
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