Commit Graph

15058 Commits

Author SHA1 Message Date
Mariusz Felisiak 71da2b4f11 [2.0.x] Refs #24254 -- Removed unnecessary SQL AS clause in SQLCompiler.as_sql().
Incorrect on Oracle.

Backport of 11ade8eefd from master
2017-10-06 13:18:56 -04:00
Mariusz Felisiak 20d6785426 [2.0.x] Fixed #28596 -- Fixed QuerySet.bulk_create() and cascade deletion crash on Oracle when using more than 65535 parameters.
Thanks Tim Graham for the review.
Backport of 1b823b8f18 from master
2017-10-05 18:54:45 +02:00
Jon Dufresne 5091bb6a07 [2.0.x] Refs #27025, #28593 -- Fixed "invalid escape sequence" warnings in urls/resolvers.py.
Backport of f0ffa3f4ea from master
2017-09-30 20:33:18 -04:00
Tim Graham d6cec5f6ff [2.0.x] Fixed #27979 -- Made MySQL raise IntegrityError rather than OperationalError when saving negative numbers in PositiveInteger fields.
Backport of dd82f33271 from master
2017-09-29 18:33:10 -04:00
Simon Charette deb3b58b36 [2.0.x] Refs #28492 -- Defined aggregates' output_field at the class level.
Missed in 08654a99bb.

Backport of f1b713024e from master
2017-09-29 08:20:08 -04:00
Mariusz Felisiak 8368d5a400 [2.0.x] Fixed #28629 -- Made tree.Node instances hashable.
Regression in 508b5debfb which
added Node.__eq__().

Backport of fc6528b25a from master
2017-09-28 12:07:36 -04:00
Josh Schneier 7c6590af5f [2.0.x] Fixed #28562 -- Fixed DecimalValidator handling of positive exponent scientific notation.
Backport of e8c4596329 from master
2017-09-27 09:42:20 -04:00
Mariusz Felisiak c67dce911e [2.0.x] Merged startswith() calls.
Backport of 00709d704e from master
2017-09-25 09:18:44 -04:00
Tim Graham e241b4e797 [2.0.x] Reverted "Fixed #28248 -- Fixed password reset tokens being valid for 1 day longer than PASSWORD_RESET_TIMEOUT_DAYS."
This reverts commit 95993a89ce.

Backport of 67a6ba391b from master
2017-09-25 09:06:32 -04:00
Claude Paroz d68744f6ad [2.0.x] Fixed JS linter error
Regression introduced in 1f3dfd783d.
Backport of c180abe6f1 from master.
2017-09-24 18:09:23 +02:00
Claude Paroz 600104172a [2.0.x] Updated translation catalogs 2017-09-24 13:54:11 +02:00
Claude Paroz 9907f8a5fd [2.0.x] Refs #25006 -- Marked again admin time picker shortcuts for translation
Backport of fe000ab18d from master.
2017-09-24 13:45:58 +02:00
Tim Graham bf987b70d2 [2.0.x] Bumped version to 2.0 alpha 1. 2017-09-22 12:58:24 -04:00
Nicolas Delaby 01d440fa1e Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) support.
Thanks Anssi Kääriäinen for contributing to the patch.
2017-09-22 11:53:17 -04:00
Mariusz Felisiak 3f9d85d95c Removed unused eof argument to BoundaryIter._find_boundary().
Unused since its introduction in d725cc9734.
2017-09-22 10:47:14 -04:00
Daniel Tao 6f7279c4b1 Refs #28593 -- Made URLResolver._populate() more resilient to signal interrupts.
_populate() sets the populating attribute to prevent infinite recursion in
case a urlconf includes itself. The flag is a threadlocal to avoid a race
condition [1] where one thread sets the flag and another checks it, then
proceeds to access data that's supposed to be populated (e.g. _reverse_dict)
but isn't yet.

The potential still exists for a thread to set the threadlocal, then be
interrupted by a signal such as SIGALRM and raise before resetting the
threadlocal flag. In this scenario, subsequent calls to _populate() in the
same thread will short-circuit erroneously.

The bulk of the method was already wrapped in a try/finally in df41b5a, but
since a signal interrupt can occur at any line executed by the interpreter,
this moves up the try to ensure threadlocal gets reset.

[1]: https://groups.google.com/d/msg/django-developers/D_bIeinKHjE/4NmVQUJqAgAJ
2017-09-22 10:16:05 -04:00
Shai Berger d612026c37 Refs #28595 -- Added a hook to add execute wrappers for database queries.
Thanks Adam Johnson, Carl Meyer, Anssi Kääriäinen, Mariusz Felisiak,
Michael Manfre, and Tim Graham for discussion and review.
2017-09-21 12:13:09 -04:00
Stefan Sinca 347551c2a1 Fixed #28508 -- Set the foreground color to black in CSRF and 404 error templates. 2017-09-21 10:23:23 -04:00
Niall Dalton 4fe6588da3 Fixed #28576 -- Added color interpretation method to GDALBand. 2017-09-21 09:42:38 -04:00
Thomas Schorr 52eb5b289e Fixed #28617 -- Made ogrinspect output pep8 compliant. 2017-09-20 21:03:14 -04:00
Sjoerd Job Postmus df41b5a05d Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.
Thanks Aymeric Augustin for shepherding the DEP and patch review.
Thanks Marten Kenbeek and Tim Graham for contributing to the code.
Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
2017-09-20 18:04:42 -04:00
Florian Apolloner c4c128d67c Fixed #28488 -- Reallowed error handlers to access CSRF tokens.
Regression in eef95ea96f.
2017-09-20 16:22:18 -04:00
Nicolas Delaby a30ef353e2 Removed unused list in Query.resolve_lookup_value().
Unneeded since its introduction in 4f138fe5a4.
2017-09-20 09:50:14 -04:00
Tim Graham f7b0532ec0 Refs #28334 -- Fixed crash in hstore/citext oid caching during test db creation. 2017-09-19 07:04:31 -04:00
Mariusz Felisiak fb02ebe889 Fixed #28597 -- Fixed crash with the name of a model's autogenerated primary key in an Index's fields. 2017-09-18 14:06:00 -04:00
Johannes Hoppe 94cd8efc50 Fixed #14370 -- Allowed using a Select2 widget for ForeignKey and ManyToManyField in the admin.
Thanks Florian Apolloner and Tim Graham for review and
contributing to the patch.
2017-09-18 13:48:02 -04:00
Johannes Hoppe 01a294f8f0 Refs #14370 -- Vendored Select2 4.0.3 for use by the admin.
From https://github.com/select2/select2/releases/tag/4.0.3
2017-09-18 13:47:50 -04:00
Mads Jensen d549b88050 Fixed #26608 -- Added support for window expressions (OVER clause).
Thanks Josh Smeaton, Mariusz Felisiak, Sergey Fedoseev, Simon Charettes,
Adam Chainz/Johnson and Tim Graham for comments and reviews and Jamie
Cockburn for initial patch.
2017-09-18 09:42:29 -04:00
Mads Jensen 3939e2b4dc Changed default value of DatabaseFeatures.has_bulk_insert to True. 2017-09-18 08:12:35 -04:00
elky dc37e8846e Fixed #26818 -- Added responsive CSS for the admin. 2017-09-16 19:11:19 -04:00
Sergey Fedoseev 8f947730ca Removed unneeded StdDev.convert_value() and Variance.convert_value().
Seems unneeded since its introduction in
f59fd15c49.
2017-09-16 15:05:31 -04:00
Sergey Fedoseev 873858009c Simplified Count.convert_value() and RegrCount.convert_value(). 2017-09-16 14:31:51 +05:00
Igor Gumenyuk 86a18dc46a Fixed #28334 -- Added caching for hstore/citext OIDs. 2017-09-15 10:00:12 -04:00
Tim Graham cb362a6750 Removed unnecessary check in SQLCompiler.get_related_selections(). 2017-09-15 08:37:46 -04:00
Mariusz Felisiak 0ec0e5029c Removed unnecessary parens in various code. 2017-09-13 21:20:29 -04:00
Tim Graham ee4043f735 Refs #28593 -- Moved django.conf.urls.include() to django.urls().
The old location remains for backwards compatibility. Documentation
will be updated separately along with the rest of the URL routing changes.
2017-09-13 16:32:03 -04:00
Mariusz Felisiak 0214f367bc Merged isinstance() calls. 2017-09-13 15:00:45 -04:00
Mariusz Felisiak c6a1faecc3 Refs #27090 -- Added real database sequence introspection.
Thanks Mariusz Felisiak for the Oracle part and Tim Graham for the
review.
2017-09-13 20:12:32 +02:00
Sergey Fedoseev c2ecef869c Refs #28569 -- Fixed gis_tests.inspectapp.tests.OGRInspectTest.test_time_field. 2017-09-12 22:19:44 +05:00
Tom ac756f16c5 Fixed #28440 -- Fixed WSGIServer hang on responses without a Content-Length.
Disabled keep-alive to fix the regression in
e6065c7b83.
2017-09-12 10:41:28 -04:00
Tim Graham 2a4b331348 Moved contrib.gis.geometry.regex to contrib.gis.geometry. 2017-09-12 09:51:02 -04:00
Tim Graham f896eb30f6 Removed django.contrib.gis.geometry.backend.
The layer of indirection is unchanged and undocumented
since its introduction in ff60c5f9de.
2017-09-12 09:51:02 -04:00
Sergey Fedoseev f36e5d68d9 Used sqlite3.Connection.load_extension() instead of query execution for SpatiaLite loading. 2017-09-12 09:35:33 -04:00
Sergey Fedoseev bd903e8a6e Fixed #28570 -- Dropped support for GEOS 3.3.x.
Removed setting SRID in GEOSGeometry.clone() which was only required
in GEOS 3.3.0.
2017-09-11 13:57:24 -04:00
Simon Charette 08654a99bb Fixed #28492 -- Defined default output_field of expressions at the class level.
This wasn't possible when settings were accessed during Field initialization
time as our test suite setup script was triggering imports of expressions
before settings were configured.
2017-09-11 12:22:39 -04:00
Simon Charette 13be453080 Refs #28492 -- Stopped accessing settings at Field.db_tablespace initialization.
Deferring accesses to settings allows database fields to be initialized before
settings are loaded.
2017-09-11 12:21:49 -04:00
Sergey Fedoseev 3905cfa1a5 Fixed #28353 -- Fixed some GIS functions when queryset is evaluated more than once.
Reverted test for refs #27603 in favor of using FuncTestMixin.
2017-09-11 11:56:39 -04:00
Jon Dufresne 99e65d6488 Fixed #28578 -- Renamed DatabaseCreation number arguments to suffix. 2017-09-11 11:32:40 -04:00
Sergey Fedoseev a0b4ecce57 Fixed #28392 -- Fixed GIS's WKT regex to match large scientific notation numbers.
Thanks Greg Larmore for report and initial patch.
2017-09-11 09:13:02 -04:00
Mariusz Felisiak a4092af3d3
Removed unnecessary parens in _get_app_label_and_model_name(). 2017-09-10 21:26:06 +02:00