| Age | Commit message (Collapse) | Author |
|
As suggested by Anssi. This has the slightly strange side effect of
passing the expression to Expression.convert_value has the expression
passed back to it, but it allows more complex patterns of expressions.
Backport of 32d4db66b9 from master
|
|
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
|
|
Refactored compiler SELECT, GROUP BY and ORDER BY generation.
While there, also refactored select_related() implementation
(get_cached_row() and get_klass_info() are now gone!).
Made get_db_converters() method work on expressions instead of
internal_type. This allows the backend converters to target
specific expressions if need be.
Added query.context, this can be used to set per-query state.
Also changed the signature of database converters. They now accept
context as an argument.
|
|
This is a reliqua from the early days of the modeltests/regressiontests era.
|
|
Complete rework of translating data values from database
Deprecation of SubfieldBase, removal of resolve_columns and
convert_values in favour of a more general converter based approach and
public API Field.from_db_value(). Now works seamlessly with aggregation,
.values() and raw queries.
Thanks to akaariai in particular for extensive advice and inspiration,
also to shaib, manfre and timograham for their reviews.
|
|
Thanks Rahul Priyadarshi.
|
|
|
|
|
|
|
|
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* override_settings may now be imported from django.test
* removed Approximate from django.test
* updated documentation for things importable from django.test
Thanks akaariai for the suggestion.
|
|
|
|
|
|
In order to verify the behavior of using the yaml serializer when yaml
is on the system, fake the ImportError when the serializer is being
registered.
|
|
This test makes sure an YAML import errors are communicated to the
caller rather than stating the serializer does not exist.
|
|
|
|
It could fail when actual serialization JSON field ordering was
different from the hard-coded one. Refs #13182.
|
|
|
|
Thanks Stéphane Raimbault for the report and the initial patch.
|
|
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
|
|
Refs #20680.
|
|
Fixed #20483.
|
|
enter_transaction_management() was nearly always followed by managed().
In three places it wasn't, but they will all be refactored eventually.
The "forced" keyword argument avoids introducing behavior changes until
then.
This is mostly backwards-compatible, except, of course, for managed
itself. There's a minor difference in _enter_transaction_management:
the top self.transaction_state now contains the new 'managed' state
rather than the previous one. Django doesn't access
self.transaction_state in _enter_transaction_management.
|
|
|