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

2226 Commits

Author SHA1 Message Date
Nicolas Delaby
746caf3ef8 Fixed #28837 -- Fixed test client crash if an exception with more than one arg is raised.
Also removed usage of the problematic pattern elsewhere.

Regression in 6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba.
2017-11-28 18:55:23 -05:00
Raphael Michel
616f468760 Fixed #28848 -- Fixed SQLite/MySQL crash when ordering by a filtered subquery that uses nulls_first/nulls_last. 2017-11-27 11:35:44 -05:00
Yan Mitrofanov
54e5c4a00e Fixed #28820 -- Eliminated an extra query with QuerySet.update() on proxy models. 2017-11-21 12:11:47 -05:00
Dražen Odobašić
d97f026a7a Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after values() and values_list(). 2017-11-21 10:33:56 -05:00
Krzysztof Nazarewski
244cc40155 Fixed #26184 -- Allowed using any lookups in ModelAdmin.search_fields.
Thanks Krzysztof Nazarewski for the initial patch.
2017-11-18 19:33:52 -05:00
Дилян Палаузов
23bf4ad87f Fixed #28795 -- Removed 'not in' checks and used dict.setdefault(). 2017-11-14 10:52:52 -05:00
Mariusz Felisiak
2d3cc94284
Fixed #28781 -- Added QuerySet.values()/values_list() support for union(), difference(), and intersection().
Thanks Tim Graham for the review.
2017-11-12 14:28:11 +01:00
Sergey Fedoseev
bdb747a5f2 Simplified Field.get_choices(). 2017-11-11 19:38:29 -05:00
Paulo
ee49306176 Fixed #27710 -- Made Model.save() invalidate cached, stale relations after a primary key assignment. 2017-11-09 11:40:34 -05:00
Дилян Палаузов
c69e4bc691 Fixed #28769 -- Replaced 'x if x else y' with 'x or y'. 2017-11-07 09:08:46 -05:00
Дилян Палаузов
6c0042430e Fixed #28776 -- Fixed a/an/and typos in docs and comments. 2017-11-06 22:41:03 -05:00
Mike Hansen
514b2c989a Fixed #28723 -- Fixed RelatedManager's prefetch_related() cache name. 2017-11-02 10:06:00 -04:00
Charlie Denton
cbe334918a Fixed #28750 -- Allowed models to define Meta.manager_inheritance_from_future for backwards compatibility.
Refs 631f4ab06112aca5bd6a57b81159048f936050bf.
2017-10-31 13:22:27 -04:00
Paulo
fcfcf8aae4 Fixed #28742 -- Fixed AttributeError crash when assigning None to cached reverse relations. 2017-10-30 14:02:03 -04:00
Ran Benita
03049fb8d9 Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE .. OF.
Thanks Adam Chidlow for polishing the patch.
2017-10-28 20:33:42 -04:00
Mariusz Felisiak
81e357a7e1 Fixed #28689 -- Fixed unquoted table names in Subquery SQL when using OuterRef.
Regression in f48bc7c3dbd204eefb3c19016b1e4906ac26bee3.
2017-10-25 21:52:38 +02:00
Tomer Chachamu
21a3a29dc9 Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last. 2017-10-21 20:55:45 -04:00
Simon Charette
d4fb742094 Refs #28575 -- Made RelatedObjectDoesNotExist classes pickable.
Thanks to Rachel Tobin for the initial __qualname__ work and tests.
2017-10-18 21:43:53 -04:00
Simon Charette
0a69479b6c Fixed outdated comment in RelatedObjectDoesNotExist. 2017-10-18 20:31:47 -04:00
Tim Graham
1b73ccc4bf Fixed #28497 -- Restored the ability to use sliced QuerySets with __exact.
Regression in ec50937bcbe160e658ef881021402e156beb0eaf.

Thanks Simon Charette for review.
2017-10-16 13:56:38 -04:00
k
399a8db33b Fixed #28695 -- Allowed models to use __init_subclass__(). 2017-10-13 21:29:12 -04:00
Simon Charette
9dd405973c Corrected examples in related field descriptor docstrings.
Using lowercased model class names suggested that accessing the attribute
from instances of the class returned an instance of the descriptor, but
this is only the case when accessed from the model class.
2017-10-13 16:06:08 -04:00
Simon Charette
216eda103b Refs #28575 -- Removed unnecessary code for model exception pickling.
Setting __qualname__ is sufficient for pickling of DoesNotExist and
and MultipleObjectsReturned to work correctly.
2017-10-13 15:45:12 -04:00
Mariusz Felisiak
4f27e475b3 Refs #28643 -- Reorganized database functions.
Thanks Tim Graham for the review.
2017-10-13 21:23:00 +02:00
Rachel Tobin
6c92f711ea Refs #28575 -- Allowed pickling Model.DoesNotExist and MultipleObjectsReturned classes. 2017-10-13 09:16:09 -04:00
Paulo
a7b5ad8b19 Fixed #27846 -- Made Model.refresh_from_db() clear cached relations. 2017-10-12 17:04:10 -04:00
Mariusz Felisiak
0899d583bd Fixed #28670 -- Added FETCH/OFFSET support on Oracle.
Thanks Tim Graham for the review.
2017-10-09 18:07:03 +02:00
Mariusz Felisiak
11ade8eefd Refs #24254 -- Removed unnecessary SQL AS clause in SQLCompiler.as_sql().
Incorrect on Oracle.
2017-10-06 12:47:41 -04:00
Simon Charette
9d93dff333 Fixed #28665 -- Change some database exceptions to NotImplementedError per PEP 249. 2017-10-06 12:47:08 -04:00
Mariusz Felisiak
03da070f5c Refs #28670 -- Moved LIMIT/OFFSET SQL to DatabaseOperations.limit_offset_sql().
Thanks Tim Graham for the review.
2017-10-04 20:24:38 +02:00
Tim Graham
a2626cb3fe Fixed #28674 -- Removed unused check in QuerySet._batched_insert(). 2017-10-03 19:56:44 -04:00
Tim Graham
51d230e00b Fixed #28675 -- Removed always True variable in SQLInsertCompiler.execute_sql() check.
Unused since 7deb25b8dd5aa1ed02b5e30cbc67cd1fb0c3d6e6.
2017-10-03 10:32:11 -04:00
Дилян Палаузов
5d9b736fd8 Fixed #28652 -- Fixed a few comments in django/db/models/*. 2017-10-02 11:15:26 -04:00
Mariusz Felisiak
d896809a3a Refs #23919 -- Removed unneeded float()/int() calls. 2017-10-02 08:49:26 -04:00
Simon Charette
f1b713024e Refs #28492 -- Defined aggregates' output_field at the class level.
Missed in 08654a99bbdd09049d682ae57cc94241534b29f0.
2017-09-29 07:44:27 -04:00
Mariusz Felisiak
2b5a511bd9 Merged hash() calls.
Thanks Simon Charette for the review.
2017-09-28 12:12:47 -04:00
Mads Jensen
4508fafe16 Simplified various __eq__() methods. 2017-09-28 09:18:37 -04:00
Tim Graham
cfff2af02b Fixed #27857 -- Dropped support for Python 3.4. 2017-09-25 17:11:03 -04:00
Tim Graham
5bcca2a056 Refs #27532 -- Removed Model._meta.has_auto_field per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham
4502489a46 Refs #18974 -- Removed @models.permalink() decorator per deprecation timeline. 2017-09-22 12:51:18 -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
Nicolas Delaby
a30ef353e2 Removed unused list in Query.resolve_lookup_value().
Unneeded since its introduction in 4f138fe5a496a81115c4fba6615a517fc62c3b17.
2017-09-20 09:50:14 -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
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
Sergey Fedoseev
8f947730ca Removed unneeded StdDev.convert_value() and Variance.convert_value().
Seems unneeded since its introduction in
f59fd15c4928caf3dfcbd50f6ab47be409a43b01.
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
Tim Graham
cb362a6750 Removed unnecessary check in SQLCompiler.get_related_selections(). 2017-09-15 08:37:46 -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
Tim Graham
6e4c6281db Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda
because try/except performs better.
2017-09-07 08:16:21 -04:00