| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Unused since c2ba59fc1da5287d6286e2c2aca4083d5bafe056 (Django 1.0).
Thanks Andy Baker for the report.
|
|
Thanks Flavio Curella and Berker Peksag for the initial patch.
|
|
The method duplicates the functionality of Field.value_from_object()
and has the additional downside of being a privately named public
API method.
|
|
|
|
Forwardport of ae1d663b7913f6da233c55409c4973248372d302
from stable/1.8.x plus more.
|
|
|
|
For consistency with AutoField.
|
|
This was implemented for non-SQLite backends in 1.7 (as a
side effect of #16187).
|
|
This is consistent with CharField.
|
|
|
|
|
|
This mirrors convert_xxxfield_value nicely, taking advantage of the
adapter/converter terminology which is commonly used by DB-API modules.
|
|
|
|
|
|
|
|
|
|
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
|
|
If Field.choices is provided as an iterator, consume it in __init__ instead
of using itertools.tee (which ends up holding everything in memory
anyway). Fixes a bug where deconstruct() was consuming the iterator but
bypassing the call to `tee`.
|
|
|
|
Joint effort between myself, Josh, Anssi and Shai.
|
|
|
|
|
|
|
|
The method is mainly intended for use with UUIDField. For UUIDField we
want to call the field's default even when primary key value is
explicitly set to None to match the behavior of AutoField.
Thanks to Marc Tamlyn and Tim Graham for review.
|
|
Thanks Collin Anderson and Tim Graham for the reviews.
|
|
|
|
Several issues resolved here, following from a report that a base_field
of GenericIpAddressField was failing.
We were using get_prep_value instead of get_db_prep_value in ArrayField
which was bypassing any extra modifications to the value being made in
the base field's get_db_prep_value. Changing this broke datetime
support, so the postgres backend has gained the relevant operation
methods to send dates/times/datetimes directly to the db backend instead
of casting them to strings. Similarly, a new database feature has been
added allowing the uuid to be passed directly to the backend, as we do
with timedeltas.
On the other side, psycopg2 expects an Inet() instance for IP address
fields, so we add a value_to_db_ipaddress method to wrap the strings on
postgres. We also have to manually add a database adapter to psycopg2,
as we do not wish to use the built in adapter which would turn
everything into Inet() instances.
Thanks to smclenithan for the report.
|
|
These refactorings making overriding some text based lookup names on
other fields (specifically `contains`) much cleaner. It also removes a
bunch of duplication in the contrib.postgres lookups.
|
|
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.
|
|
|
|
|
|
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
|
|
Thanks Markus Holterman and Berker Peksag for review.
|
|
|
|
Thanks Markus Holtermann for review.
|
|
refs #22340.
|
|
|
|
This reduces how frequently this logic is run significantly.
Thanks to Anssi for the suggestion.
|
|
Use INTERVAL DAY(9) TO SECOND(6) for Durationfield on Oracle rather than
storing as a NUMBER(19) of microseconds.
There are issues with cx_Oracle which require some extra data
manipulation in the database backend when constructing queries, but it
handles the conversion back to timedelta objects cleanly.
Thanks to Shai for the review.
|
|
A field for storing periods of time - modeled in Python by timedelta. It
is stored in the native interval data type on PostgreSQL and as a bigint
of microseconds on other backends.
Also includes significant changes to the internals of time related maths
in expressions, including the removal of DateModifierNode.
Thanks to Tim and Josh in particular for reviews.
|
|
|
|
|
|
|
|
|
|
Usage of this method was removed pre 1.0 (c2ba59fc).
|
|
Fixed issue with warning message displayed for unbound naive datetime
objects when USE_TZ is True. Adds unit test that demonstrates the issue
(discoverable when using a custom lookup in MySQL).
|