Gagaro
4bd494db42
Made BaseConstraint importable from django.db.models.
2022-03-16 16:21:10 +01:00
jochemfranken
5f9ad17201
Fixed #33580 -- Fixed crash when checking support for terminal colors on Wine.
...
Regression in f1585c54d0
.
2022-03-16 16:16:10 +01:00
Gagaro
1ea7e3157d
Used sets for field names for exclusion.
...
They are used only for containment checks.
2022-03-16 11:05:09 +01:00
Gagaro
bf524d229f
Refs #30581 -- Allowed sql.Query to be used without model.
2022-03-16 09:33:16 +01:00
Mariusz Felisiak
970f5bf503
Fixed #33577 -- Confirmed support for GDAL 3.4.
2022-03-16 09:07:01 +01:00
David Smith
3b3f38b3b0
Fixed #31169 -- Adapted the parallel test runner to use spawn.
...
Co-authored-by: Valz <ahmadahussein0@gmail.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-03-15 16:23:55 +01:00
Mariusz Felisiak
3eaba13a47
Removed unnecessary _connector from Q construction in get_for_models().
...
Q._connector defaults to Q.AND.
Follow up to 859a87d873
.
2022-03-15 16:13:28 +01:00
Mariusz Felisiak
be80aa55ec
Removed outdated handling of length parameter to If-Modified-Since header.
...
The length parameter is not described in RFC-7232 and it's against
HTTP/1.0 and HTTP/1.1 specifications. It was an old and unofficial
extension set by some ancient versions of IE.
2022-03-15 13:07:44 +01:00
Sage Abdullah
a88fab1bca
Fixed #33552 -- Fixed JSONField has key lookups with numeric keys on MariaDB, MySQL, Oracle, and SQLite.
2022-03-15 06:37:35 +01:00
Biel Frontera
859a87d873
Fixed #31357 -- Fixed get_for_models() crash for stale content types when model with the same name exists in another app.
2022-03-14 12:52:26 +01:00
Adam Johnson
8f7cda0831
Fixed #33572 -- Implemented CreateModel/AlterModelManagers reduction.
2022-03-11 07:03:51 +01:00
Collin Anderson
71017a68a6
Fixed #33571 -- Fixed static serving views crash when If-Modified-Since is empty.
...
Regression in d6aff369ad
.
2022-03-11 06:19:01 +01:00
Adrian Torres
d90e34c61b
Fixed #33561 -- Allowed synchronization of user attributes in RemoteUserBackend.
2022-03-10 12:57:19 +01:00
Claude Paroz
93803a1b5f
Fixed #33567 -- Avoided setting default text/html content type on responses.
2022-03-09 14:50:52 +01:00
Adam Johnson
a8c15481f4
Rewrote some references to "master".
...
Following d9a266d657
.
2022-03-08 14:50:06 +01:00
Mariusz Felisiak
d4fd31684a
Refs #33173 -- Used locale.getlocale() instead of getdefaultlocale().
...
locale.getdefaultlocale() was deprecated in Python 3.11, see
https://bugs.python.org/issue46659 .
2022-03-08 13:17:05 +01:00
Hameed Gifford
58d357fc65
Fixed #33563 -- Fixed contenttype reverse data migration crash with a multiple databases setup.
2022-03-08 06:22:03 +01:00
Luke Plant
f3bf6c4218
Refs #33562 -- Made HttpResponse.set_cookie() raise ValueError when both "expires" and "max_age" are passed.
...
This fixes the case where you might pass set_cookie(expires=val, max_age=val)
and max_age is silently ignored.
2022-03-07 08:04:18 +01:00
Luke Plant
ae2da5ba65
Fixed #33562 -- Made HttpResponse.set_cookie() support timedelta for the max_age argument.
2022-03-07 07:57:14 +01:00
Ryan Heard
c6b4d62fa2
Fixed #29865 -- Added logical XOR support for Q() and querysets.
2022-03-04 12:55:37 +01:00
Mariusz Felisiak
795da6306a
Refs #31169 -- Prevented infinite loop in tests on failures.
...
Regression in ae91ecf6a1
.
2022-03-04 11:21:05 +01:00
Adam Johnson
b811364421
Refs #33446 -- Allowed variable whitespace in CSS source map references.
...
Follow up to dc8bb35e39
.
The Webpack default is to output CSS source map comments like
`/*# sourceMappingURL=main.css.map*/`. Also, Chromium allows tabs.
2022-03-04 06:22:28 +01:00
Keryn Knight
24cc51f8fb
Refs #27624 -- Optimized Query.clone() a bit.
2022-03-03 08:38:03 +01:00
Keryn Knight
6d5709ce7d
Refs #27624 -- Optimized sql.Query creation by moving immutable/singleton attributes to class attributes.
2022-03-03 08:36:29 +01:00
Collin Anderson
5659015d3c
Optimized lazy wrappers a bit.
...
This avoids an extra __getattribute__() call for self._wrapped.
2022-03-03 06:19:11 +01:00
Keryn Knight
95b7d01d38
Refs #33546 -- Optimized handling content types in HttpResponseBase.__init__().
...
This removes an extraneous conditional causing "Content-Type" to be
checked within the ResponseHeaders twice, if a content_type parameter
is provided.
2022-03-02 20:23:39 +01:00
Keryn Knight
4b2f6ace57
Refs #33546 -- Optimized HttpResponseBase.charset a bit.
...
This avoids scanning the Content-Type if it's empty, allowing the
Content-Type header itself to have a charset assigned without using
the re module.
2022-03-02 20:23:39 +01:00
Keryn Knight
51f896fe25
Refs #33546 -- Optimized ResponseHeaders._convert_to_charset() by reducing the type-checking duplication.
...
In the common case, where keys and values are be encoded into
ascii/latin-1, defer the checking for newlines until it's been
successfully coerced to a string.
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-03-02 20:23:39 +01:00
Keryn Knight
e0b197c63c
Refs #33546 -- Avoided unpacking data in ResponseHeaders when not necessary.
2022-03-02 20:23:39 +01:00
Nick Pope
d436554861
Fixed #33553 -- Used built-in math functions in SQLite 3.35+.
...
In SQLite 3.35+ some math functions are available built-in as long as
they are not disabled at compile time. We can introspect this and use
these built-in functions in preference to our slower implementations.
2022-03-02 10:10:48 +01:00
Mariusz Felisiak
445b075def
Fixed #33547 -- Fixed error when rendering invalid inlines with readonly fields in admin.
...
Regression in de95c82667
.
Thanks David Glenck for the report.
2022-03-01 08:09:58 +01:00
Hrushikesh Vaidya
119f227aa6
Fixed #33524 -- Allowed overriding empty_label for ForeignKey in ModelAdmin.radio_fields.
2022-02-28 13:28:21 +01:00
Dulalet
e0442a628e
Fixed #33527 -- Removed unnecessary code in ModelAdmin._changeform_view().
...
Co-authored-by: Daulet1 <d.abduali@thefactory.kz>
2022-02-26 18:07:56 +01:00
Alokik Vijay
c1d168be0f
Fixed #33508 -- Fixed DatabaseFeatures.supports_index_column_ordering on MariaDB 10.8+.
2022-02-26 16:25:21 +01:00
Albert Defler
2b6a3baebe
Fixed #31486 -- Deprecated passing unsaved objects to related filters.
...
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2022-02-25 07:51:37 +01:00
Shubh1815
11cc227344
Fixed #33267 -- Added link to related item to related widget wrapper in admin.
2022-02-25 06:33:05 +01:00
Anders Kaseorg
7f4fc5cbd4
Fixed #33539 -- Fixed spaces in WITH SQL for indexes on PostgreSQL.
2022-02-24 09:03:58 +01:00
Keryn Knight
3de787a70b
Fixed #33532 -- Optimized CaseInsensitiveMapping instantiation for dicts.
...
Internal usages of this class (e.g. HttpHeaders) provide it with a dict,
so testing for that type first avoids the cost of going through the
potential __instancecheck__ + _abc_instancecheck to establish it's
a Mapping.
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-02-23 20:15:22 +01:00
mgaligniana
fe7dbef586
Fixed #28889 -- Prevented double submission of admin forms.
...
Added a JavaScript confirm() to catch double-submissions, when the
change form has already been submitted.
Thanks to Adam Johnson, Claude Paroz, Keryn Knight, and Thibaud Colas
for review.
2022-02-23 14:57:34 +01:00
Valz
ae91ecf6a1
Refs #31169 -- Added DatabaseCreation.setup_worker_connection() hook.
2022-02-23 11:35:46 +01:00
Claude Paroz
eabc22f919
Fixed #33328 -- Transformed formset:added/removed to native JS events.
2022-02-23 10:33:07 +01:00
ravi kunwar
1f42a352e0
Fixed #33434 -- Changed font-size in admin CSS to use rem units.
2022-02-23 09:26:19 +01:00
ravi kunwar
ee13588f45
Removed unnecessary font-size in admin hr CSS.
2022-02-23 09:25:20 +01:00
Mariusz Felisiak
d11944be34
Refs #33476 -- Added warning to optimizemigration/squashmigrations commands when black cannot be applied.
2022-02-23 07:29:15 +01:00
Collin Anderson
7fd2deb3e8
Refs #32873 -- Avoided looking up settings._USE_L10N_INTERNAL twice.
2022-02-22 20:26:51 +01:00
David Wobrock
7c318a8bdd
Fixed #27844 -- Added optimizemigration management command.
2022-02-22 10:30:40 +01:00
Albert Defler
7ba6ebe914
Fixed #19580 -- Unified behavior of reverse foreign key and many-to-many relations for unsaved instances.
2022-02-22 09:16:40 +01:00
nabil-rady
b7f263551c
Refs #33517 -- Prevented __second lookup from returning fractional seconds on PostgreSQL.
2022-02-22 07:26:44 +01:00
Theo Alexiou
659d2421c7
Fixed #20296 -- Prevented mark_safe() from evaluating lazy objects.
2022-02-21 10:11:26 +01:00
Mariusz Felisiak
b626c5a979
Removed unnecessary str type from @keep_lazy decorator for escape()/escapejs().
2022-02-21 09:46:39 +01:00