Commit Graph

27535 Commits

Author SHA1 Message Date
René Fleschenberg 367634f976 Replaced 'n_' prefix with 'number_of_' in docs/topics/db/queries.txt. 2019-11-07 09:22:13 +01:00
Farhaan Bukhsh cc5622ec8c Fixed #30865 -- Doc'd that not all DATABASES['OPTIONS'] are passed to command-line client. 2019-11-07 08:04:40 +01:00
Jon Dufresne 39791c8e6d Harmonized Windows checks in tests to a single style. 2019-11-06 15:14:30 +01:00
Jon Dufresne e3c2fae4cd Adjusted expected exception message for Windows.
Test failure introduced in fbbff7f808.

Windows uses a different error message when a non-path is passed to
os.path functions.
2019-11-06 14:34:44 +01:00
Mariusz Felisiak 4c45b627f8 Removed unused import of ACTION_CHECKBOX_NAME in django.contrib.admin.
Unused since e651b3095c.
2019-11-06 12:49:42 +01:00
Daniel Fairhead e651b3095c Fixed #15742 -- Fixed an example of collecting selected objects in ModelAdmin.actions docs.
The queryset argument is already filtered, and request.POST doesn't
contain all selected objects when "Select All" is used.
2019-11-06 12:49:27 +01:00
Jon Dufresne 74f2a58b3a Refs #29983 -- Added tests for FileBasedCache pathlib support. 2019-11-06 10:01:01 +01:00
Jon Dufresne fbbff7f808 Refs #29983 -- Added pathlib.Path support to the file email backend. 2019-11-06 09:33:07 +01:00
Dan Swain 422b875c65 Documented arguments for custom 500 error view. 2019-11-06 09:08:15 +01:00
Stephen Rauch 4b6db766ba Refs #30183 -- Doc'd dropping support for sqlparse < 0.2.2.
Support for sqlparse < 0.2.2 was broken in
782d85b6df because is_whitespace property
was added in sqlparse 0.2.2.
2019-11-06 08:45:43 +01:00
Jon Dufresne c8debd5061 Added a link to the file email backend from EMAIL_FILE_PATH setting. 2019-11-06 08:24:49 +01:00
Jon Dufresne 1c4c68dfed Refs #29983 -- Added test for FILE_UPLOAD_TEMP_DIR pathlib support. 2019-11-06 08:20:23 +01:00
Jon Dufresne 92e5abd7a3 Refs #29983 -- Added test for FIXTURES_DIRS pathlib support. 2019-11-06 08:06:55 +01:00
Jon Dufresne 89368ab6e3 Fixed #30944 -- Changed reusable apps docs to use a declarative config. 2019-11-05 14:58:09 +01:00
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