kola-er
d94d7b113c
Fixed #30928 -- Clarified MySQL/MariaDB support of QuerySet.select_for_update() options.
...
Thanks Par Andersson for reporting the issue.
2019-11-05 14:34:40 +01:00
Jon Dufresne
edeec1247e
Passed strict=True to Path.resolve() to enforce that the path must exist.
2019-11-05 14:22:20 +01:00
Alasdair Nicol
b991eefd3a
Refs #30923 -- Fixed an example of rendering templates in contrib.sites docs.
2019-11-05 12:41:14 +01:00
Hasan Ramezani
47379d027b
Fixed #30095 -- Fixed system check for RangeField/ArrayField.choices with lists and tuples.
2019-11-05 11:48:44 +01:00
Hasan Ramezani
dc60597eb6
Refs #30095 -- Added Field._choices_is_value().
...
This allows fields classes to override the validation of choices'
values.
2019-11-05 11:48:44 +01:00
Mariusz Felisiak
a20ea33ca6
Fixed DatabaseFeatures.has_select_for_update_nowait on MariaDB 10.3+.
...
Thanks Kola Erinoso for the report.
2019-11-05 10:18:47 +01:00
Jon Dufresne
b9fe7f9294
Fixed #30947 -- Changed tuples to lists in model Meta options in django.contrib modules.
...
The Django "Model Meta options" docs provide examples and generally
point the reader to use lists for the unique_together and ordering
options. Follow our own advice for contrib models.
More generally, lists should be used for homogeneous sequences of
arbitrary lengths of which both unique_together and ordering are.
2019-11-05 08:16:31 +01:00
Mariusz Felisiak
e5cacb1f47
Refs #30947 -- Changed tuples to lists in model Meta options examples in docs.
...
Follow up to 97d3321e89
.
2019-11-04 10:20:30 -08:00
Jon Dufresne
cff6b14b27
Removed unnecessary EXCLUDE_FROM_PACKAGES from setup.py.
...
Unnecessary since abc0777b63
where the
extension was changed to not be ".py". Also, django.bin doesn't have
a __init__.py file, so it is not a package and therefore it's not
excluded by this argument.
2019-11-04 15:36:10 +01:00
bedilbek
09a00c60bd
Added Uzbek locale formats.
2019-11-04 14:50:55 +01:00
Claude Paroz
6ccb1b68bc
Added Uzbek language.
2019-11-04 14:50:00 +01:00
Nick Pope
7286eaf681
Refs #13312 -- Simplified handling of nulls ordering on MySQL.
...
MySQL & MariaDB support the standard IS NULL and IS NOT NULL so
the same workaround used for NULLS FIRST and NULLS LAST that is
used for SQLite < 3.30.0 can be used.
Thanks Simon Charette for the discussion.
2019-11-04 14:47:58 +01:00
Jon Dufresne
e0e88ceaaa
Refs #30116 -- Simplified stdout/stderr decoding with subprocess.run()'s encoding argument.
...
The encoding argument has been available since Python 3.6.
https://docs.python.org/3/library/subprocess.html#subprocess.run
2019-11-04 11:21:25 +01:00
Adam Johnson
5a856669bf
Updated list of field types conversions in ModelForm docs.
2019-11-04 10:31:48 +01:00
Jon Dufresne
607004f81a
Simplified consecutive calls to pathlib.Path.parent.
2019-11-04 09:59:34 +01:00
Mariusz Felisiak
126cfefce2
Added release dates for 2.2.7, 2.1.14, and 1.11.26.
2019-11-04 08:20:22 +01:00
Carlton Gibson
2d38eb0ab9
Fixed #30931 -- Restored ability to override Model.get_FIELD_display().
...
Thanks Sergey Fedoseev for the implementation idea.
Regression in a68ea23101
.
2019-11-04 07:55:34 +01:00
Hasan Ramezani
8463390527
Refs #27808 -- Added test for saving nested ArrayField with nullable base field.
2019-11-01 15:56:21 +01:00
Simon Charette
a699595fce
Refs #13312 -- Removed unnecessary IF wrapping in nulls_last handling on MySQL.
...
ISNULL function already returns 0 and 1 on MySQL.
2019-10-31 20:17:04 +01:00
Mariusz Felisiak
a9bd01d363
Refs #30095 -- Simplified Field._check_choices() a bit.
...
Using an internal is_value() hook to check whether Field.choices
is iterable is misleading.
2019-10-31 20:04:47 +01:00
Sky
3cf907c20c
Fixed #30761 -- Prevented floatformat filter from returning a negative zero.
2019-10-31 10:48:35 +01:00
Sky
459de8dc29
Added more tests for floatformat filter with negative values.
2019-10-31 10:07:59 +01:00
Hasan Ramezani
17752003a8
Refs #28428 -- Made FileSystemStorage.save() to support pathlib.Path.
2019-10-31 09:06:05 +01:00
Hasan Ramezani
0f2975534d
Refs #28428 -- Added tests for using FileSystemStorage with pathlib.Path.
2019-10-31 08:52:15 +01:00
Simon Charette
377c7cb2f7
Refs #23576 -- Disabled MySQL multi-alias deletion path on MariaDB 10.3.2+.
2019-10-31 08:14:30 +01:00
Gil Forcada Codinachs
632d7bbd3d
Fixed typo in docs/ref/signals.txt.
2019-10-30 16:52:40 +01:00
Mariusz Felisiak
a370dbd954
Corrected error message in Many-to-many relationships docs.
2019-10-30 16:17:20 +01:00
Felipe Lee
c2c27867ef
Refs #20456 -- Moved initialization of HEAD method based on GET to the View.setup() for generic views.
...
This will ease unit testing of views since setup will essentially do
everything needed to set the view instance up (other than instantiating
it). Credit for idea goes to Vincent Prouillet.
2019-10-30 14:43:52 +01:00
Felipe Lee
31d1822532
Refs #20456 -- Added test for initialization of request/args/kwargs attributes in View.Setup().
2019-10-30 14:43:47 +01:00
André Ericson
54a7b02112
Fixed #30927 -- Simplified an example of test for the deprecation warning with assertWarnsMessage().
2019-10-30 13:35:36 +01:00
Hasan Ramezani
6315a272c5
Refs #28428 -- Made filepath_to_uri() support pathlib.Path.
2019-10-30 13:13:15 +01:00
Ken Whitesell
4c762588ff
Fixed #30917 -- Clarified formsets topic documentation.
2019-10-30 08:41:31 +01:00
Hasan Ramezani
f57e174fa6
Fixed #13750 -- Clarified need to reopen models.ImageField.image file to access raw image data.
2019-10-29 14:29:39 +01:00
Mariusz Felisiak
bf7b3e2750
Fixed typo in docs/topics/files.txt.
2019-10-29 14:28:05 +01:00
Sergey Fedoseev
2f010795e6
Simplified AuthenticationMiddleware a bit.
...
SimpleLazyObject already caches value in _wrapped.
2019-10-29 13:20:13 +01:00
Nick Pope
7552de7866
Used more specific unittest assertions in tests.
...
* assertIsNone()/assertIsNotNone() instead of comparing to None.
* assertLess() for < comparisons.
* assertIs() for 'is' expressions.
* assertIsInstance() for isinstance() expressions.
* rounding of assertAlmostEqual() for round() expressions.
* assertIs(..., True/False) instead of comparing to True/False.
* assertIs()/assertIsNot() for ==/!= comparisons.
* assertNotEqual() for == comparisons.
* assertTrue()/assertFalse() instead of comparing to True/False.
2019-10-29 12:37:30 +01:00
Erwin Junge
a6cb8ec389
Fixed #30922 -- Fixed ModelAdmin.date_hierarchy queries with DST changes.
...
There was an issue where admin date_hierarchy didn't render last day of
a month in DST-switch month.
2019-10-29 11:21:03 +01:00
Hasan Ramezani
e3d0b4d550
Fixed #30899 -- Lazily compiled import time regular expressions.
2019-10-29 09:22:26 +01:00
Hasan Ramezani
39a34d4bf9
Refs #30899 -- Made _lazy_re_compile() support bytes.
2019-10-29 09:14:24 +01:00
Hasan Ramezani
c4cba148d8
Refs #30899 -- Moved _lazy_re_compile() to the django.utils.regex_helper.
2019-10-29 09:14:24 +01:00
Hasan Ramezani
6c6d24a4fe
Refs #30908 -- Added test for nonexistent path in forms.FilePathField.
2019-10-29 08:39:56 +01:00
Adam Johnson
ab0fd3f58f
Documented the order in which signal receivers are called.
2019-10-28 13:31:23 +01:00
Hasan Ramezani
52cb419072
Fixed #30918 -- Made timesince()/timeuntil() respect custom time strings for future and the same datetimes.
2019-10-28 12:28:18 +01:00
Pavel Dedik
711a7d4d50
Fixed #30907 -- Fixed SplitArrayField.has_changed() with removal of empty trailing values.
2019-10-28 10:32:34 +01:00
Pavel Dedik
bcfbb71c63
Refs #30907 -- Added SplitArrayField._remove_trailing_nulls() hook.
2019-10-28 10:32:09 +01:00
Pavel Dedik
d95b1ddcbe
Refs #30907 -- Added more tests for SplitArrayField.has_changed().
2019-10-28 10:32:05 +01:00
Sergey Fedoseev
6bbf9a20e2
Fixed #29770 -- Added LinearRing.is_counterclockwise property.
2019-10-25 14:28:26 +02:00
Carlton Gibson
24e540fbd7
Fixed #29087 -- Added delete buttons for unsaved admin inlines on validation error.
2019-10-25 13:28:08 +02:00
Carlton Gibson
6ea3aadd17
Refs #29087 -- Refactored admin inlines.js.
...
Split logic into separate functions to clarify and allow reuse.
2019-10-25 13:28:08 +02:00
Mariusz Felisiak
daa9415f78
Refs #30908 -- Fixed the empty value of forms.FilePathField in docs.
2019-10-25 11:22:03 +02:00