Carlton Gibson
11c5e0609b
Fixed CVE-2019-19118 -- Required edit permissions on parent model for editable inlines in admin.
...
Thank you to Shen Ying for reporting this issue.
2019-12-02 08:56:08 +01:00
Mariusz Felisiak
0107e3d105
Fixed #30953 -- Made select_for_update() lock queryset's model when using "self" with multi-table inheritance.
...
Thanks Abhijeet Viswa for the report and initial patch.
2019-12-02 07:57:19 +01:00
Baptiste Mispelon
f47ba7e780
Fixed #30255 -- Fixed admindocs errors when rendering docstrings without leading newlines.
...
Used inspect.cleandoc() which implements PEP-257 instead of an internal
hook.
2019-11-29 12:47:42 +01:00
Mariusz Felisiak
e8fcdaad5c
Fixed #31021 -- Fixed proxy model permissions data migration crash with a multiple databases setup.
...
Regression in 98296f86b3
.
2019-11-29 08:23:01 +01:00
Jon Dufresne
86a0231e0a
Refs #23919 -- Replaced super(...) with super() in metaclasses.
2019-11-28 15:34:29 +01:00
Jon Dufresne
46a0edc3ba
Fixed #31028 -- Used classList API to check, add and remove DOM classes.
...
Thanks to Claude Paroz for review.
2019-11-28 15:21:37 +01:00
Jon Dufresne
c8bd37a860
Fixed #31042 -- Removed AdminSeleniumTestCase.get_css_value() in favor of Selenium .is_displayed().
...
All instances of AdminSeleniumTestCase.get_css_value() were used to
inspect the display property.
2019-11-28 15:10:13 +01:00
Johannes Hoppe
249a6190ae
Fixed #30975 -- Replaced custom get_select_option with Selenium's select_by_value.
2019-11-27 16:34:07 +01:00
Johannes Hoppe
69dbb6b708
Fixed #30973 -- Converted selenium tests wait_page_loaded to context manager.
2019-11-27 14:36:26 +01:00
Hasan Ramezani
8d32290279
Fixed #30425 -- Handled jinja2.TemplateSyntaxError when rendering a template.
...
Jinja raises jinja2.TemplateSyntaxError in render() not in
get_template() when it's in an included template.
2019-11-27 12:48:07 +01:00
Farhaan Bukhsh
1f817daa20
Fixed #30803 -- Allowed comma separators for milliseconds in django.utils.dateparse functions.
...
Co-Authored-By: Ben Wilber <benwilber@gmail.com>
2019-11-27 09:43:12 +01:00
Farhaan Bukhsh
42b23d1e79
Refs #30803 -- Allowed comma separators for decimal fractions in parse_duration().
2019-11-27 09:43:12 +01:00
Jon Dufresne
cab3661832
Fixed #31027 -- Replaced .getAttribute()/.setAttribute() usage with DOM properties.
2019-11-27 07:53:04 +01:00
Baptiste Mispelon
52936eface
Fixed #31031 -- Fixed data loss in admin changelist view when formset's prefix contains regex special chars.
...
Regression in b18650a263
.
2019-11-26 08:48:10 +01:00
Johannes Hoppe
ef93fd4683
Fixed #31013 -- Removed jQuery usage in SelectBox.js.
2019-11-25 13:35:20 +01:00
Simon Charette
0290e01d5a
Fixed #31002 -- Fixed GIS lookups crash against a subquery annotation.
...
Thanks Vasileios Bouzas for the report.
2019-11-25 12:30:33 +01:00
John Bowen
29d8198841
Fixed #27914 -- Fixed serialization of nested classes in migrations.
2019-11-25 11:12:44 +01:00
Baptiste Mispelon
824981b2dc
Removed unused unencoded_ampersands_re regex.
...
Unused since 8b81dee60c
.
2019-11-25 09:01:31 +01:00
Sergey Fedoseev
a5855c8f0f
Fixed #30996 -- Added AsWKB and AsWKT GIS functions.
2019-11-22 13:40:48 +01:00
Baptiste Mispelon
8929afb8ec
Fixed #9762 -- Made DateFormat.r() locale-independent.
...
Thanks to Antonio Melé for the original report all those years ago
and to all the contributors who helped along the way.
2019-11-22 12:41:53 +01:00
Baptiste Mispelon
76ec032712
Refs #26281 -- Added a helpful error message for an invalid "r" specifier to dateformat.format().
2019-11-22 12:32:30 +01:00
Simon Charette
379bf1a2d4
Fixed #8467 -- Prevented crash when adding existent m2m relation with an invalid type.
...
This was an issue anymore on backends that allows conflicts to be
ignored (Refs #19544 ) as long the provided values were coercible to the
expected type. However on the remaining backends that don't support
this feature, namely Oracle, this could still result in an
IntegrityError.
By attempting to coerce the provided values to the expected types in
Python beforehand we allow the existing value set intersection in
ManyRelatedManager._get_missing_target_ids to prevent the problematic
insertion attempts.
Thanks Baptiste Mispelon for triaging this old ticket against the
current state of the master branch.
2019-11-22 09:08:10 +01:00
Carlton Gibson
ee4a19053a
Fixed #31012 -- Reverted "Fixed #29056 -- Fixed HTML5 validation of required SelectDateWidget."
...
This reverts commit f038214d91
.
The initial issue was incorrect. Django 2.2, and before, did not
generate invalid HTML as reported. With f03821 in place invalid HTML
was generated.
Thanks to Kevin Brown for follow-up report and investigation.
2019-11-21 20:53:31 +01:00
Farhaan Bukhsh
664c98f1f8
Fixed #30413 -- Fixed test database signature on SQLite when test database name is provided.
...
Previously, the same signature was created for multiple in-memory
databases on SQLite when they had tests databases names
DATABASES['TEST']['NAME'].
2019-11-21 19:50:24 +01:00
Jon Dufresne
62254c5202
Simplified TemplateDetailView with pathlib.Path.read_text().
2019-11-21 15:14:03 +01:00
Simon Charette
f97a6123c0
Refs #25367 -- Made Query.build_filter() raise TypeError on non-conditional expressions.
2019-11-21 11:56:35 +01:00
Simon Charette
e9a0e1d4f6
Fixed #30484 -- Added conditional expressions support to CheckConstraint.
2019-11-21 11:56:35 +01:00
Simon Charette
37e6c5b79b
Refs #25367 -- Moved conditional expression wrapping to the Exact lookup.
2019-11-21 11:56:35 +01:00
Simon Charette
306b687520
Refs #11964 -- Removed SimpleCol in favor of Query(alias_cols).
...
This prevent having to pass simple_col through multiple function calls
by defining whether or not references should be resolved with aliases
at the Query level.
2019-11-21 11:56:35 +01:00
Jon Dufresne
f5ebdfce5c
Fixed #25388 -- Added an option to allow disabling of migrations during test database creation.
2019-11-20 20:42:38 +01:00
Hasan Ramezani
0284a26af9
Fixed #30981 -- Fixed admin changelist crash when using F() or OrderBy() expressions in admin_order_field.
2019-11-19 15:40:04 +01:00
Daniel Izquierdo
89abecc75d
Fixed #27272 -- Added an on_delete RESTRICT handler to allow cascading deletions while protecting direct ones.
2019-11-19 10:55:05 +01:00
Daniel Izquierdo
4e1d809aa5
Refs #27272 -- Added Collector.add_dependency().
2019-11-19 10:49:47 +01:00
Caio Ariede
555bebe774
Fixed #30987 -- Added models.PositiveBigIntegerField.
2019-11-19 09:34:11 +01:00
Jon Dufresne
aa12cf07c9
Removed unnecessary numeric indexes in format strings.
2019-11-19 08:29:47 +01:00
Sergey Fedoseev
f95b59a1b3
Fixed #30994 -- Added Oracle support for AsGeoJSON GIS function.
2019-11-18 15:32:44 +01:00
Jon Dufresne
57a3d96ff5
Replaced unnecessary str()/bytes() calls with literals.
2019-11-18 15:30:10 +01:00
Jon Dufresne
e649d691f8
Removed unnecessary parentheses in various code.
2019-11-18 15:25:59 +01:00
Simon Charette
11e327a3ff
Fixed #30988 -- Deprecated the InvalidQuery exception.
...
It was barely documented without pointers at its defining location and
was abused to prevent misuse of the QuerySet field deferring feature.
2019-11-18 14:06:51 +01:00
Baptiste Mispelon
cbe4d6203f
Fixed #30989 -- Removed unimplemented B time format.
...
It's never been documented and has always raised a NotImplementedError.
2019-11-18 12:50:41 +01:00
Baptiste Mispelon
5e2839f320
Simplified DateFormat.W() and z().
2019-11-18 11:30:23 +01:00
Baptiste Mispelon
1185c6172b
Fixed #30990 -- Fixed example output in 'z' date format docs.
2019-11-18 11:30:20 +01:00
Simon Charette
3ca77e2b84
Replaced QueryWrapper single usage with RawSQL.
2019-11-18 10:45:24 +01:00
Mariusz Felisiak
8685e764ef
Fixed #30986 -- Fixed queryset crash when filtering against boolean RawSQL expressions on Oracle.
2019-11-18 08:50:09 +01:00
Hasan Ramezani
530dd193f2
Fixed #29808 -- Fixed initial migration detection when identifiers are case-insensitive.
...
Thanks Simon Charette for the review.
2019-11-15 09:01:30 +01:00
Hasan Ramezani
d0c86a1df4
Refs #29808 -- Optimized MigrationExecutor.detect_soft_applied().
...
Use set() for iterables used only for containment checks. Simplify
column checks O(n) instead of O(2n).
Thanks Simon Charette for an idea.
2019-11-15 08:05:26 +01:00
Dulmandakh
24b9f50823
Fixed #29916 -- Added lower_inc, lower_inf, upper_inc, and upper_inf lookups for RangeFields.
...
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-11-14 22:27:29 +01:00
daniel a rios
efc3e32d6d
Fixed #30759 -- Made cache.delete() return whether it succeeded.
...
Thanks Simon Charette for the review.
2019-11-14 11:14:11 +01:00
Mariusz Felisiak
6e99585c19
Fixed #30941 -- Reverted "Simplified AuthenticationMiddleware a bit."
...
This reverts commit 2f010795e6
.
2019-11-13 16:33:25 +01:00
George Marshall
8be79984dc
Fixed #30971 -- Prevented Query.resolve_lookup_value() from coercing list values to tuples.
...
Regression in 8a281aa7fe
.
2019-11-13 08:27:26 +01:00