django/tests/model_fields
Marc Tamlyn 39d95fb6ad Fixed #24092 -- Widened base field support for ArrayField.
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.
2015-01-16 16:15:16 -05:00
..
4x8.png Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00
8x4.png Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00
__init__.py Merged regressiontests and modeltests into the test root. 2013-02-26 14:36:57 +01:00
models.py Refs #2443 -- Allowed creation of objects with NULL DurationFields 2015-01-07 08:33:26 -05:00
test_durationfield.py Refs #2443 -- Allowed creation of objects with NULL DurationFields 2015-01-07 08:33:26 -05:00
test_field_flags.py Fixed #12663 -- Formalized the Model._meta API for retrieving fields. 2015-01-06 19:25:12 -05:00
test_imagefield.py Fixed a few ResourceWarning in the test suite. Refs #22680. 2014-05-26 03:23:17 +07:00
test_uuid.py Fixed #19463 -- Added UUIDField 2014-09-16 10:08:09 +01:00
tests.py Fixed #24092 -- Widened base field support for ArrayField. 2015-01-16 16:15:16 -05:00