1
0
mirror of https://github.com/django/django.git synced 2024-12-26 19:16:11 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
quaspas
91f87b8f91 Fixed #26283 -- Fixed removal of trailing nulls for SplitArrayField. 2016-03-12 17:22:25 -05:00
Fernando Miranda
2495023a4c Fixed #25143 -- Added ArrayField.from_db_value().
Thanks Karan Lyons for contributing to the patch.
2016-03-12 09:14:35 -05:00
Claude Paroz
928c12eb1a Fixed #26215 -- Fixed RangeField/ArrayField serialization with None values
Also added tests for HStoreField and JSONField.
Thanks Aleksey Bukin for the report and Tim Graham for the initial patch and
the review.
2016-02-16 21:07:05 +01:00
Simon Charette
a08fda2111 Fixed #25746 -- Isolated inlined test models registration.
Thanks to Tim for the review.
2016-01-06 20:00:07 -05:00
Simon Charette
3738e4ac46 Fixed #25841 -- Handled base array fields validation errors with params.
Thanks to Trac alias benzid-wael for the report.
2015-12-17 20:25:04 -05:00
Simon Charette
59b57e672c Fixed #25867 -- Fixed a system check crash with nested ArrayFields.
Thanks to Jean Gourds for the report, Tim and Claude for the review.
2015-12-07 14:45:22 -05:00
Attila Tovt
88fc9e2826 Fixed #25772 -- Corrected __len lookup on ArrayField for empty arrays. 2015-11-25 16:53:05 -05:00
Simon Charette
d95b22bd56 Refs #25745 -- Isolated some postgres array field check tests. 2015-11-14 11:33:28 -05:00
Dmitry Dygalo
263b3d2ba1 Fixed #25666 -- Fixed the exact lookup of ArrayField. 2015-11-14 11:21:16 -05:00
Tim Graham
1f07da3e29 Fixed #25597 -- Fixed crash with SplitArrayField and IntegerField on invalid value. 2015-10-27 08:11:11 -04:00
Dražen Odobašić
b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Caio Ariede
dad8434d6f Fixed #25180 -- Prevented varchar_patterns_ops and text_patterns_ops indexes for ArrayField. 2015-08-15 10:02:08 -04:00
Ion Scerbatiuc
0cc059cd10 Fixed #25172 -- Fixed check framework to work with multiple databases. 2015-08-12 18:00:26 -04:00
Ion Scerbatiuc
520802160a Fixed #25226 -- Set the model attribute on ArrayField's base_field 2015-08-05 15:01:32 -04:00
Andriy Sokolovskiy
2a7c59cd88 Added missing tests for transforms usage with subquery for PostgreSQL fields 2015-06-06 09:04:53 -04:00
Marc Tamlyn
00e8e514e1 Name PostgreSQL correctly. 2015-05-30 23:10:30 +01:00
Claude Paroz
36e90d1f45 Stopped special-casing postgres-specific tests
Refs #23879.
2015-04-18 15:17:49 +02:00
Marc Tamlyn
c490e410af Fixed #24373 -- Added run_validators to ArrayField.
Thanks to DavidMuller for the report.
2015-02-20 11:51:46 +00:00
Tim Graham
8b39f33d78 Fixed #24290 -- Skipped postgres_tests if not running with PostgreSQL. 2015-02-17 06:34:13 -05:00
Markus Holtermann
b06935a486 Refs #22962 -- Made test case use non-conflicting table names 2015-02-13 14:01:54 +01:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Marc Tamlyn
0ae94d0d31 Fixes #24169 -- More arrayfield specific lookups.
varchar()[] cannot compare itself to text[]

Thanks to joelburton for the patch.
2015-01-20 09:52:23 +00:00
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
Marc Tamlyn
48ad288679 Fixed #24001 -- Added range fields for PostgreSQL.
Added support for PostgreSQL range types to contrib.postgres.

- 5 new model fields
- 4 new form fields
- New validators
- Uses psycopg2's range type implementation in python
2015-01-10 16:18:19 +00:00
Jernej Kos
7c50e7eecc Fixed #24034 -- Don't always overwrite deconstruct path.
Made deconstruct path overwriting for ArrayField conditional,
so it only occurs when the deconstructed field is an instance
of ArrayField itself and not a subclass.
2014-12-21 17:31:50 +01:00
Markus Holtermann
912ad03226 Fixed #23894 -- Made deconstruct methods favor kwargs over args 2014-11-28 06:05:56 -05:00
Daan Vielen
a7c58eaca4 added test and fix to check for default null on ArrayField 2014-11-15 15:20:11 +00:00
Marc Tamlyn
ef9f109013 Fixed #22962 -- Default values for ArrayField with migrations.
Fields normally try to force the default value to a string. As
translatable strings are not valid default values for ArrayField, we can
remove this behaviour which was causing issues with some migrations.

Thanks to @schinckel for the report.
2014-07-29 10:37:11 +01:00
Marc Tamlyn
b65a2001e7 Fixed #22907 -- Array contains must have same type. 2014-07-15 19:41:26 +01:00
Marc Tamlyn
635acf42c5 Fix a test dependent on json ordering. 2014-05-22 15:05:19 +01:00
Marc Tamlyn
604162604b Added array field support for PostgreSQL.
The first part of django.contrib.postgres, including model and two form
fields for arrays of other data types.

This commit is formed of the following work:

    Add shell of postgres app and test handling.

    First draft of array fields.

    Use recursive deconstruction.

    Stop creating classes at lookup time.

    Add validation and size parameter.

    Add contained_by lookup.

    Add SimpleArrayField for forms.

    Add SplitArrayField (mainly for admin).

    Fix prepare_value for SimpleArrayField.

    Stop using MultiValueField and MultiWidget.

    They don't play nice with flexible sizes.

    Add basics of admin integration.

    Missing:
    - Tests
    - Fully working js

    Add reference document for django.contrib.postgres.fields.ArrayField.

    Various performance and style tweaks.

    Fix internal docs link, formalise code snippets.

    Remove the admin code for now.

    It needs a better way of handing JS widgets in the admin as a whole
    before it is easy to write. In particular there are serious issues
    involving DateTimePicker when used in an array.

    Add a test for nested array fields with different delimiters.

    This will be a documented pattern so having a test for it is useful.

    Add docs for SimpleArrayField.

    Add docs for SplitArrayField.

    Remove admin related code for now.

    definition -> description

    Fix typo.

    Py3 errors.

    Avoid using regexes where they're not needed.

    Allow passing tuples by the programmer.

    Add some more tests for multidimensional arrays.

    Also fix slicing as much as it can be fixed.

    Simplify SplitArrayWidget's data loading.

    If we aren't including the variable size one, we don't need to search
    like this.
2014-05-22 09:53:26 +01:00