Jon Dufresne
9762617a03
Improved tests assertions in cache tests.
...
Added assertions to compare results of .add(), .delete(), .touch(),
.incr(), .decr(), and .get_or_set() methods.
Made tests use assertIs() rather than assertTrue/False().
2019-12-31 12:49:36 +01:00
Mariusz Felisiak
c159baceba
Refs #31117 -- Isolated backends.sqlite.test_creation.TestDbSignatureTests.
2019-12-31 12:09:50 +01:00
David Wobrock
2f565f84ac
Fixed #31097 -- Fixed crash of ArrayAgg and StringAgg with filter when used in Subquery.
2019-12-31 10:35:43 +01:00
David Wobrock
7d44aeb388
Refs #31097 -- Added tests for filter in ArrayAgg and StringAgg.
2019-12-31 10:35:39 +01:00
Sjbrgsn
b2bd08bb7a
Fixed #30892 -- Fixed slugify() and admin's URLify.js for "İ".
...
Thanks Luis Nell for the implementation idea and very detailed report.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-12-30 20:47:22 +01:00
Simon Charette
5779cc938a
Fixed #31071 -- Disabled insert optimization for primary keys with defaults when loading fixtures.
...
Model.save_base() is called directly when loading fixtures and assumes
existing rows will be updated. Branching of "raw" allows to maintain
the optimization introduced in #29260 while supporting this edge case.
Regression in 85458e94e3
.
Thanks Reupen Shah for the report.
2019-12-30 07:49:10 +01:00
Mariusz Felisiak
5a68f02498
Fixed random models_fields.test_uuid.TestQuerying failures.
...
Random failures depended on a generated UUID.
2019-12-27 15:25:50 +01:00
Mads Jensen
62727e65fb
Increased test coverage of django.utils.inspect.
2019-12-27 10:08:24 +01:00
Jon Dufresne
e42b68debf
Fixed #31114 -- Fixed HttpRequest.build_absolute_uri() crash with reverse_lazy() locations.
2019-12-27 09:19:56 +01:00
Claude Paroz
5660267e5b
Fixed #31121 -- Cleared Site cache in SitesFrameworkTests.
...
Thanks Matthijs Kooijman for the report and analysis.
2019-12-27 08:57:34 +01:00
Mariusz Felisiak
22ce5d0031
Fixed #31106 -- Fixed migrations crash on PostgreSQL 10+ when adding FK constraints inline and changing data.
...
This allows adding foreign key constraints inline and changing data in
the same migration on PostgreSQL 10+.
Regression in 738faf9da2
.
Thanks Janne Rönkkö for the report and Simon Charette for the
implementation idea and review.
2019-12-23 23:28:59 +01:00
Mariusz Felisiak
45bcc6feac
Refs #31115 -- Added test for nested subquery that references related fields.
...
Thanks Dmitriy Gunchenko for the report and Simon Charette for the
analysis and tests.
Regression in 5a4d7285bd
.
Fixed in 5a4d7285bd
.
2019-12-23 12:17:56 +01:00
Jon Dufresne
67ea35df52
Fixed #30998 -- Added ModelChoiceIteratorValue to pass the model instance to ChoiceWidget.create_option().
2019-12-23 10:34:50 +01:00
Simon Charette
720de4d044
Fixed #31109 -- Disabled grouping by aliases on QuerySet.exists().
...
Clearing the SELECT clause in Query.has_results was orphaning GROUP BY
references to it.
Thanks Thierry Bastian for the report and Baptiste Mispelon for the
bisect.
Regression in fb3f034f1c
.
2019-12-23 09:24:03 +01:00
Nick Pope
a2d894b2e4
Refs #28954 -- Removed remaining Jython-specific code from dispatch tests.
...
Missed in 23b21db31b
.
2019-12-19 16:42:12 +01:00
Hasan Ramezani
a3fc24f014
Fixed #31095 -- Made RelatedManager.set() preserve existing m2m relations with an invalid type.
2019-12-19 13:33:05 +01:00
Simon Charette
5a4d7285bd
Fixed #31094 -- Included columns referenced by subqueries in GROUP BY on aggregations.
...
Thanks Johannes Hoppe for the report.
Regression in fb3f034f1c
.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-12-19 10:04:56 +01:00
Simon Charette
a0f34d8fef
Refs #31094 -- Added test for not using aliases in GROUP BY clauses.
2019-12-19 09:12:29 +01:00
Mike Hansen
35d36d9462
Refs #30585 -- Updated project templates and tests to use (block)translate tags.
2019-12-18 13:15:38 +01:00
Mike Hansen
d291c72bf2
Fixed #30585 -- Added {% translate %} and {% blocktranslate %} template tags.
2019-12-18 13:15:38 +01:00
Simon Charette
5b1fbcef7a
Fixed CVE-2019-19844 -- Used verified user email for password reset requests.
...
Co-Authored-By: Florian Apolloner <florian@apolloner.eu>
2019-12-18 09:11:39 +01:00
Shubham singh
f4647179cc
Fixed #31086 -- Improved error message for admin model inlines with more than one foreign key to the same parent.
2019-12-17 09:15:01 +01:00
James Turk
ff00a05347
Fixed #31088 -- Added support for websearch searching in SearchQuery.
2019-12-16 14:59:59 +01:00
Zeynel Özdemir
9d40b6bbf4
Fixed #31076 -- Fixed dbshell crash on Windows with Python < 3.8.
...
subprocess.run()'s args parameter accepts path-like objects on Windows
since Python 3.8.
2019-12-16 11:20:41 +01:00
Baptiste Mispelon
4161e35048
Refs #12679 -- Added test for using property as ModelAdmin.inlines.
...
Fixed in 1d8eb0cae5
.
2019-12-14 21:15:44 +01:00
Baptiste Mispelon
738e9e615d
Fixed #26743 -- Fixed UnboundLocalError crash when deserializing m2m fields and value isn't iterable.
2019-12-13 11:38:09 +01:00
Osaetin Daniel
b33bfc3839
Fixed #30862 -- Allowed setting SameSite cookies flags to 'none'.
...
Thanks Florian Apolloner and Carlton Gibson for reviews.
2019-12-12 10:52:31 +01:00
Baptiste Mispelon
200cd8803d
Refs #25361 -- Added test for pickling queryset of abstract-inherited models with Meta.ordering.
...
Fixed in 67cf5efa31
.
2019-12-12 09:01:47 +01:00
Jon Dufresne
8ea3ff155e
Fixed typo in tests/cache/tests.py docstring.
2019-12-11 17:39:21 +01:00
Jon Dufresne
8d087f9a17
Fixed typo in ModelChoiceFieldTests.
...
The subindex and attrs arguments should be passed through to the parent,
not overridden as None.
2019-12-11 15:15:12 +01:00
Jon Dufresne
e703b93a65
Fixed #31080 -- Removed redundant type="text/javascript" attribute from <script> tags.
2019-12-11 09:49:54 +01:00
Baptiste Mispelon
d8e2333528
Fixed #31077 -- Made debug decorators raise TypeError if they're not called.
...
Django will raise an error if you forget to call the decorator.
2019-12-10 13:34:28 +01:00
Peter Andersen
02eff7ef60
Fixed #31073 -- Prevented CheckboxInput.get_context() from mutating attrs.
2019-12-10 12:27:50 +01:00
Mariusz Felisiak
3fb7c12158
Refs #23433 -- Fixed test_django_admin_py.DeprecationTest tests failures on Windows and Python < 3.8.
...
subprocess.run()'s args parameter accepts a path-like object on Windows
since Python 3.8.
2019-12-10 11:17:50 +01:00
Baptiste Mispelon
3df3c5e670
Fixed #26480 -- Fixed crash of contrib.auth.authenticate() on decorated authenticate() methods of authentication backends.
...
The Signature API (PEP 362) has better support for decorated functions
(by default, it follows the __wrapped__ attribute set by
functools.wraps for example).
2019-12-10 09:36:30 +01:00
Mariusz Felisiak
d6505273cd
Refs #31044 -- Fixed error message when using Prefetch with a values_list() queryset.
2019-12-09 15:45:53 +01:00
Hasan Ramezani
4540842bc3
Fixed #31044 -- Errored nicely when using Prefetch with a raw() queryset.
2019-12-09 15:45:18 +01:00
Baptiste Mispelon
9e565386d3
Fixed #27430 -- Added -b/--buffer option to DiscoverRunner.
2019-12-09 13:47:12 +01:00
Mariusz Felisiak
f464526388
Refs #30676 -- Added test for invalid --pdb and --parallel usage in DiscoverRunner.
2019-12-09 11:12:06 +01:00
Alex Aktsipetrov
bf12273db4
Fixed #31060 -- Reallowed window expressions to be used in conditions outside of queryset filters.
...
Regression in 4edad1ddf6
.
Thanks utapyngo for the report.
2019-12-06 13:52:16 +01:00
Jon Dufresne
5708327c37
Fixed #23433 -- Deprecated django-admin.py entry point in favor of django-admin.
...
Unify on the entry point created by setuptools entry_points feature.
2019-12-06 12:11:44 +01:00
Jon Dufresne
8eb0f73eed
Refs #23433 -- Removed script argument from AdminScriptTestCase.run_test().
2019-12-06 10:33:54 +01:00
Jon Dufresne
8aefe11137
Removed unnecessary __init__.py creation in admin_scripts.tests.
2019-12-06 09:57:09 +01:00
Mariusz Felisiak
82a88d2f48
Fixed #31061 -- Ignored positional args in django.urls.resolve() when all optional named parameters are missing.
...
Regression in 76b993a117
.
Thanks Claude Paroz for the report and Carlton Gibson for reviews.
2019-12-06 09:32:51 +01:00
Hasan Ramezani
5d674eac87
Fixed #31039 -- Added support for contained_by lookup with AutoFields, SmallIntegerField, and DecimalField.
2019-12-05 15:50:39 +01:00
Carlton Gibson
6410d38ca7
Moved selenium import to nested scope.
2019-12-05 12:47:31 +01:00
Gordon Pendleton
adb9661789
Fixed #31010 -- Allowed subdomains of localhost in the Host header by default when DEBUG=True.
2019-12-05 09:44:45 +01:00
Aymeric Augustin
c06492dd87
Fixed #23524 -- Allowed DATABASES['TIME_ZONE'] option on PostgreSQL.
2019-12-04 18:22:08 +01:00
Baptiste Mispelon
26cab4e8c1
Fixed #31046 -- Allowed RelatedManager.add()/create()/set() to accept callable values in through_defaults.
2019-12-03 19:47:38 +01:00
Andrew Godwin
c90ab30fa1
Fixed #31056 -- Allowed disabling async-unsafe check with an environment variable.
2019-12-03 17:29:31 +01:00