1
0
mirror of https://github.com/django/django.git synced 2025-03-24 00:00:45 +00:00

2271 Commits

Author SHA1 Message Date
Claude Paroz
a87189fc5e Fixed -- Improved float conversions in DecimalField.to_python
Thanks Tim Graham and Adam Johnson for the reviews.
2017-05-09 08:40:08 +02:00
François Freitag
88336fdbb5 Fixed -- Added a setting to disable server-side cursors on PostgreSQL.
When a connection pooler is set up in transaction pooling mode, queries
relying on server-side cursors fail. The DISABLE_SERVER_SIDE_CURSORS
setting in DATABASES disables server-side cursors for this use case.
2017-05-06 06:59:04 -04:00
Tim Graham
d66378a8b2 Fixed -- Fixed __in lookups on a foreign key when using the foreign key's parent model as the lookup value.
Thanks Simon Charette for review.
2017-05-05 18:35:08 -04:00
François Freitag
c0a2b9508a Fixed -- Fixed prefetch_related() crash when fetching relations in nested Prefetches. 2017-05-04 09:17:29 -04:00
Tim Graham
584e10c76e Fixed -- Fixed Model._state.db on MTI parent model after saving child model.
Regression in 38575b007a722d6af510ea46d46393a4cda9ca29.
2017-05-03 12:14:15 -04:00
Simon Charette
9ae4362bec Refs -- Stopped compiling query compilers during lookup rhs processing.
Lookup right hand side processing was compiling query compilers which happened
to work by chance as SQLCompiler defines a as_sql() method with two optional
parameters albeit it doesn't expect the same type of arguments.
2017-05-01 00:41:21 -04:00
Simon Charette
eb4724a063 Reverted "Refs -- Moved subquery ordering clearing optimization to the __in lookup."
This reverts commit e62ea0bb9cbb54c1eef848871fe3eab2bad268dc since it
broke multi-column __in lookups and _meta.order_wrt on Oracle.
2017-04-28 09:30:35 -04:00
Simon Charette
e62ea0bb9c Refs -- Moved subquery ordering clearing optimization to the __in lookup.
Queries could potentially be resolved in cases where ordering matter.
2017-04-27 16:58:08 -04:00
Jon Dufresne
7be94e0335 Replaced set |= operator with update() to avoid temporary set. 2017-04-27 08:16:19 -04:00
Claude Paroz
301de774c2 Refs -- Replaced many force_text() with str()
Thanks Tim Graham for the review.
2017-04-27 09:10:02 +02:00
Simon Charette
c9159a082e Refs -- Removed the Query._prepare_as_filter_value() hack. 2017-04-25 23:43:33 -04:00
Simon Charette
ec50937bcb Refs -- Removed the Query._forced_pk hack. 2017-04-25 23:43:33 -04:00
Carles Pina Estany
9f2e8b5bb7 Fixed -- Checked that CharField.max_length is not a boolean. 2017-04-24 18:49:31 -04:00
Simon Charette
8ef35468b6 Fixed -- Fixed a regression with nested __in subquery lookups and to_field.
Thanks Kristian Klette for the report and Tim for the help.
2017-04-23 00:21:27 -04:00
Claude Paroz
43b4a1618e Fixed -- Allowed prefetch calls with ModelIterable subclasses
Regression in 7ec330eeb96d0874949eacb8ed1bbb97e11807e1.
Thanks Tim Graham for the review.
2017-04-19 19:32:46 +02:00
Sergey Fedoseev
e7afef13f5 Fixed -- Fixed QuerySet.update() crash when updating a geometry to another one. 2017-04-10 13:26:26 -04:00
Mariusz Felisiak
054a44d6f0 Used NotSupportedError instead of DatabaseError in SQLCompiler.as_sql(). 2017-04-10 12:49:27 -04:00
Tim Graham
fce7827101 Fixed -- Fixed QuerySet.filter() crash when it uses the name of a OneToOneField pk.
Regression in 1bc249c2a67c24fcd28436c85388eff1d826e305.
2017-04-10 09:51:51 -04:00
Ingo Klöcker
c4536c4a54 Fixed -- Made File.open() work with the with statement ()
Fixed  -- Made File.open() work with the with statement
2017-04-07 14:21:06 +02:00
Mariusz Felisiak
695d4dd790 Fixed -- Disabled a limit/offset on a query with select_for_update on Oracle.
Thanks Shai Berger and Tim Graham for the reviews.
2017-04-07 14:08:07 +02:00
Adam Johnson
7f8a924b45 Refs -- Removed Value wrapping from StrIndex's substring param. 2017-04-03 08:39:57 -04:00
Sergey Fedoseev
bde86ce9ae Fixed -- Made GIS DB functions accept geometric expressions, not only values, in all positions. 2017-04-01 09:47:49 -04:00
Sergey Fedoseev
068d75688f Refs -- Fixed SQLite QuerySet filtering on decimal result of Least and Greatest. 2017-03-29 13:29:53 -04:00
Mariusz Felisiak
1d070d027c Fixed -- Fixed QuerySet.annotate() with pk in values() on MySQL.
Thanks Tim Graham and Simon Charette for the reviews.
2017-03-29 06:47:07 +02:00
Tim Graham
b59c0d722d Refs -- Added stacklevel for permalink() deprecation. 2017-03-28 17:58:10 -04:00
Mads Jensen
ed0cbc8d8b Refs -- Removed some Python 2 compatibility code and comments. 2017-03-27 13:12:27 -04:00
Mariusz Felisiak
1b6f05e91f Fixed -- Fixed QuerySet.in_bulk() crash on SQLite when requesting more than 999 ids.
Thanks Andrei Picus and Anssi Kääriäinen for the initial patch
and Tim Graham for the review.
2017-03-27 18:43:40 +02:00
Kapil Garg
7e09fa7f51 Fixed -- Fixed models.Field.formfield() setting 'disabled' for fields with choices. 2017-03-23 13:22:04 -04:00
Sergey Fedoseev
40ffabe8dc Removed unneeded Value wraps in Substr.
Unneeded since e2d6e14662d780383e18066a3182155fb5b7747b.
2017-03-23 10:50:56 -04:00
Tim Graham
3d19d1428a Fixed -- Allowed Meta.indexes to be defined in abstract models.
Thanks Markus Holtermann for review.
2017-03-21 10:53:21 -04:00
Mads Jensen
19b8ca5824 Removed unused connector parameter of Query.build_filter().
Unused since 6fe2b001dba45134d7c10729c57959995e241a88.
2017-03-18 09:04:56 -04:00
Mads Jensen
e45633086c Removed unused rest_of_lookups parameter of Query.try_transform().
Unused since 534aaf56f4a8e261e111426b2a709e2f8816192f.
2017-03-18 09:00:59 -04:00
Mads Jensen
82bb4e684f Fixed -- Fixed crash with BrinIndex name > 30 characters. 2017-03-18 08:12:10 -04:00
Brad Melin
b625907a79 Fixed -- Added StrIndex database function. 2017-03-14 19:58:56 -04:00
Mads Jensen
e7033e00f8
Used constant instead of hard-coded value for max index name length
Refs 
2017-03-14 15:50:37 +01:00
Adam Chainz
a452dddb25 Fixed -- Added a system check that Field.validators are callable. 2017-03-11 12:27:29 -05:00
Adam Johnson
af121b08e8 Refs -- Made many attributes of Query immutable. 2017-03-08 09:25:44 -05:00
Bo Marchman
9bbb6e2d25 Fixed -- Fixed a nondeterministic AssertionError in QuerySet combining.
Thanks Andrew Brown for the test case.
2017-03-06 13:40:17 -05:00
Claude Paroz
8346680e1c Refs -- Removed unneeded force_text calls
Thanks Tim Graham for the review.
2017-03-04 18:18:21 +01:00
Matthew Schinckel
f48bc7c3db Fixed -- Fixed incorrectly quoted table aliases in Subquery SQL.
Add aliases from resolved querysets to the parent query's external
aliases to prevent those aliases from being quoted.

Thanks to Vasily Stepanov for the report and Tim Graham for the review.
2017-03-01 07:56:37 -05:00
Anton Samarchyan
60e52a047e Refs -- Updated django.db docstring verbs according to PEP 257. 2017-02-28 09:17:27 -05:00
Tim Graham
d6e26e5b7c Removed obsolete references to form_for_instance(). 2017-02-28 07:37:25 -05:00
Ian Foote
508b5debfb Refs -- Made Q objects deconstructible. 2017-02-23 20:47:48 -05:00
Ian Foote
19b2dfd1bf Refs , -- Made Expressions deconstructible. 2017-02-23 20:44:06 -05:00
Vytis Banaitis
3dcc351691 Refs -- Used yield from. 2017-02-23 20:06:01 -05:00
Alexey Rogachev
c743af82cf Fixed typo in DurationField's docstring. 2017-02-20 08:44:05 -05:00
Vytis Banaitis
d5088f838d Fixed -- Fixed a crash when subtracting Integer/DurationField from DateField on Oracle/PostgreSQL. 2017-02-16 11:46:32 -05:00
Tim Graham
0595bca221 Fixed -- Reverted "Fixed -- Serialized natural keys in multi-table inheritance models."
This reverts commit 74a575eb7296fb04e1fc2bd4e3f68dee3c66ee0a as it causes
unexpected migrations and doesn't seem to be the best solution.
2017-02-11 06:34:59 -05:00
ClairePhila
d26413113c Refs -- Fixed UUIDField.to_python(None) crash.
Regression in 2f9861d823620da7ecb291a8f005f53da12b1e89.
2017-02-10 13:54:52 -05:00
ClairePhila
edad02af06 Allow UUIDField to be None when deserializing 2017-02-10 17:26:02 +01:00