1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00
django/tests/postgres_tests
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
..
array_default_migrations Fixed #22962 -- Default values for ArrayField with migrations. 2014-07-29 10:37:11 +01:00
migrations Fixed #24092 -- Widened base field support for ArrayField. 2015-01-16 16:15:16 -05:00
__init__.py Added array field support for PostgreSQL. 2014-05-22 09:53:26 +01:00
models.py Fixed #24092 -- Widened base field support for ArrayField. 2015-01-16 16:15:16 -05:00
test_array.py Fixed #24092 -- Widened base field support for ArrayField. 2015-01-16 16:15:16 -05:00
test_hstore.py Added HStoreField. 2014-11-04 09:26:40 +00:00
test_ranges.py Fixed #24001 -- Added range fields for PostgreSQL. 2015-01-10 16:18:19 +00:00
test_unaccent.py Fixed #23423 -- Added unaccent lookup in django.contrib.postgres 2014-11-28 18:22:20 -05:00