1
0
mirror of https://github.com/django/django.git synced 2025-04-27 10:44:36 +00:00

10638 Commits

Author SHA1 Message Date
Mariusz Felisiak
8be477be5c
Fixed timezones tests for PyYAML 5.3+. 2020-01-07 09:54:22 +01:00
Adam Johnson
2ea3fb3e63 Removed "Don't do that" from docs and error messages.
It's slightly aggressive and doesn't explain itself.
2020-01-06 13:50:43 +01:00
Claude Paroz
1487f16f2d Fixed -- Made forms.DateTimeField accept ISO 8601 date inputs.
Thanks José Padilla for the initial patch, and Carlton Gibson for the
review.
2020-01-06 10:52:09 +01:00
Mariusz Felisiak
0f843fdd5b
Fixed -- Disabled grouping by aliases on QuerySet.values()/values_list().
Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80.

Thanks Sigurd Ljødal for the report.
2020-01-04 20:49:11 +01:00
Claude Paroz
495d7a1ddf Reorganized forms.DateTimeField tests. 2020-01-03 10:36:58 +01:00
Simon Charette
9bcbcd599a Fixed -- Fixed crash when subtracting against a subquery annotation.
The subtract_temporals() database operation was not handling expressions
returning SQL params in mixed database types.

Regression in 35431298226165986ad07e91f9d3aca721ff38ec.

Thanks Reupen Shah for the report.
2020-01-03 10:35:08 +01:00
Federico Jaramillo Martínez
372eaa395f Fixed -- Added EmptyFieldListFilter class in admin.filters.
Thanks Simon Charette and Carlton Gibson for reviews.

Co-Authored-By: Jonas Haag <jonas@lophus.org>
Co-Authored-By: Christophe Baldy <christophe.baldy@polyconseil.fr>
2020-01-03 07:58:04 +01:00
Mariusz Felisiak
1960d55f8b
Refs -- Fixed crypt.crypt() call in test_hashers.py.
An empty string is invalid salt in Python 3 and raises exception since
Python 3.9, see https://bugs.python.org/issue38402.
2020-01-03 07:47:04 +01:00
Patrick Seebauer
e3d546a1d9 Fixed -- Fixed TemplateSyntaxError in simple_tag() and inclusion_tag() for kwargs. 2020-01-02 10:44:07 +01:00
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 -- Isolated backends.sqlite.test_creation.TestDbSignatureTests. 2019-12-31 12:09:50 +01:00
David Wobrock
2f565f84ac Fixed -- Fixed crash of ArrayAgg and StringAgg with filter when used in Subquery. 2019-12-31 10:35:43 +01:00
David Wobrock
7d44aeb388 Refs -- Added tests for filter in ArrayAgg and StringAgg. 2019-12-31 10:35:39 +01:00
Sjbrgsn
b2bd08bb7a Fixed -- 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 -- 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  while supporting this edge case.

Regression in 85458e94e38c20e57939947ee515a1a53689659f.

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 -- Fixed HttpRequest.build_absolute_uri() crash with reverse_lazy() locations. 2019-12-27 09:19:56 +01:00
Claude Paroz
5660267e5b Fixed -- 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 -- 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 738faf9da2a5cd03148a36375db80746c99c9623.

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 -- 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 5a4d7285bd10bd40d9f7e574a7c421eb21094858.

Fixed in 5a4d7285bd10bd40d9f7e574a7c421eb21094858.
2019-12-23 12:17:56 +01:00
Jon Dufresne
67ea35df52 Fixed -- Added ModelChoiceIteratorValue to pass the model instance to ChoiceWidget.create_option(). 2019-12-23 10:34:50 +01:00
Simon Charette
720de4d044 Fixed -- 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 fb3f034f1c63160c0ff13c609acd01c18be12f80.
2019-12-23 09:24:03 +01:00
Nick Pope
a2d894b2e4 Refs -- Removed remaining Jython-specific code from dispatch tests.
Missed in 23b21db31bfcf2a065d485617412cca43a311a4c.
2019-12-19 16:42:12 +01:00
Hasan Ramezani
a3fc24f014 Fixed -- Made RelatedManager.set() preserve existing m2m relations with an invalid type. 2019-12-19 13:33:05 +01:00
Simon Charette
5a4d7285bd Fixed -- Included columns referenced by subqueries in GROUP BY on aggregations.
Thanks Johannes Hoppe for the report.

Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-12-19 10:04:56 +01:00
Simon Charette
a0f34d8fef Refs -- Added test for not using aliases in GROUP BY clauses. 2019-12-19 09:12:29 +01:00
Mike Hansen
35d36d9462 Refs -- Updated project templates and tests to use (block)translate tags. 2019-12-18 13:15:38 +01:00
Mike Hansen
d291c72bf2 Fixed -- 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 -- 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 -- Added support for websearch searching in SearchQuery. 2019-12-16 14:59:59 +01:00
Zeynel Özdemir
9d40b6bbf4 Fixed -- 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 -- Added test for using property as ModelAdmin.inlines.
Fixed in 1d8eb0cae57731b481a88dca272b2cb0d645bd8e.
2019-12-14 21:15:44 +01:00
Baptiste Mispelon
738e9e615d Fixed -- Fixed UnboundLocalError crash when deserializing m2m fields and value isn't iterable. 2019-12-13 11:38:09 +01:00
Osaetin Daniel
b33bfc3839 Fixed -- 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 -- Added test for pickling queryset of abstract-inherited models with Meta.ordering.
Fixed in 67cf5efa31acb2916034afb15610b700695dfcb0.
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 -- Removed redundant type="text/javascript" attribute from <script> tags. 2019-12-11 09:49:54 +01:00
Baptiste Mispelon
d8e2333528 Fixed -- 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 -- Prevented CheckboxInput.get_context() from mutating attrs. 2019-12-10 12:27:50 +01:00
Mariusz Felisiak
3fb7c12158
Refs -- 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 -- 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 -- Fixed error message when using Prefetch with a values_list() queryset. 2019-12-09 15:45:53 +01:00
Hasan Ramezani
4540842bc3 Fixed -- Errored nicely when using Prefetch with a raw() queryset. 2019-12-09 15:45:18 +01:00
Baptiste Mispelon
9e565386d3 Fixed -- Added -b/--buffer option to DiscoverRunner. 2019-12-09 13:47:12 +01:00
Mariusz Felisiak
f464526388
Refs -- Added test for invalid --pdb and --parallel usage in DiscoverRunner. 2019-12-09 11:12:06 +01:00
Alex Aktsipetrov
bf12273db4 Fixed -- Reallowed window expressions to be used in conditions outside of queryset filters.
Regression in 4edad1ddf6203326e0be4bdb105beecb0fe454c4.

Thanks utapyngo for the report.
2019-12-06 13:52:16 +01:00
Jon Dufresne
5708327c37 Fixed -- 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