1
0
mirror of https://github.com/django/django.git synced 2025-01-11 02:46:13 +00:00
django/docs/ref/contrib
Jon Dufresne 9e38ed0536 Fixed #27486 -- Fixed Python 3.7 DeprecationWarning in intword and filesizeformat filters.
intword and filesizeformat passed floats to ngettext() which is
deprecated in Python 3.7. The rationale for this warning is documented
in BPO-28692: https://bugs.python.org/issue28692.

For filesizeformat, the filesize value is expected to be an int -- it
fills %d string formatting placeholders. It was likely coerced to a
float to ensure floating point division on Python 2. Python 3 always
does floating point division, so coerce to an int instead of a float to
fix the warning.

For intword, the number may contain a decimal component. In English, a
decimal component makes the noun plural. A helper function,
round_away_from_one(), was added to convert the float to an integer that
is appropriate for ngettext().
2019-06-11 20:34:59 +02:00
..
admin Fixed #28831 -- Doc'd that InlineModelAdmin methods' obj argument is the parent object. 2019-05-31 12:35:15 +02:00
gis Removed redundant object descriptions to prevent warnings with Sphinx 2.1.0. 2019-06-03 14:08:51 +02:00
postgres Removed unnecessary /static from links to PostgreSQL docs. 2019-03-29 21:49:44 -04:00
auth.txt Refs #30226 -- Added User.get_user_permissions() method. 2019-06-05 13:56:37 +02:00
contenttypes.txt
flatpages.txt
humanize.txt Fixed #27486 -- Fixed Python 3.7 DeprecationWarning in intword and filesizeformat filters. 2019-06-11 20:34:59 +02:00
index.txt
messages.txt
redirects.txt
sitemaps.txt
sites.txt
staticfiles.txt
syndication.txt Fixed #29352 -- Allowed specifying a Feed language. 2019-05-06 15:10:54 +02:00