| Age | Commit message (Collapse) | Author |
|
JSON/HStoreField annotation.
This was a regression introduced by 7deeabc7c7526786df6894429ce89a9c4b614086
to address CVE-2019-14234.
Thanks Tim Kleinschmidt for the report and Mariusz for the tests.
Backport of 6c3dfba89215fc56fc27ef61829a6fff88be4abb from master.
|
|
on expressions with params.
Regression in 4f5b58f5cd3c57fee9972ab074f8dc6895d8f387.
Thanks Florian Apolloner for the report and helping with tests.
Backport of 1f8382d34d54061eddc41df6994e20ee38c60907 from master.
|
|
index lookups against SQL injection.
Thanks to Sage M. Abdullah for the report and initial patch.
Thanks Florian Apolloner for reviews.
|
|
This reverts commit 463fe11bc8b2d068e447c5df677e7a31c2af7e03 due to
restore of relative paths sorting from isort < 4.3.5 in isort 4.3.10.
Backport of b435f82939edf70674856e0e1cd63973c2e0a1d1 from master.
|
|
Backport of 463fe11bc8b2d068e447c5df677e7a31c2af7e03 from master.
|
|
Backport of f0a68c25118786d47041d0a435b2afa953be3c86 from master
|
|
Backport of fb5bd38e3b83c7f0d1011de80f922fc34faf740b from master
|
|
|
|
This prevents the base_field from sharing attributes with the one used
during migrations.
|
|
Thanks Harris Lapiroff for the report.
|
|
|
|
|
|
Thanks Nick Stefan for the report and Tim for the review.
|
|
|
|
Python 3.6 parses strings like '0_1' as numeric literals.
http://bugs.python.org/issue26331
|
|
|
|
Thanks Berker Peksag and Tim Graham for the reviews.
|
|
|
|
Thanks Tim Graham for completing the initial patch.
|
|
Used the same test and fix as in #25867.
This required initializing base_field in RangeField.__init__,
not when setting the attribute.
|
|
|
|
Thanks Karan Lyons for contributing to the patch.
|
|
Also added tests for HStoreField and JSONField.
Thanks Aleksey Bukin for the report and Tim Graham for the initial patch and
the review.
|
|
|
|
HStoreField now converts all keys and values to string before they're
saved to the database.
|
|
Thanks to Trac alias benzid-wael for the report.
|
|
|
|
Thanks to Jean Gourds for the report, Tim and Claude for the review.
|
|
|
|
|
|
|
|
|
|
The method duplicates the functionality of Field.value_from_object()
and has the additional downside of being a privately named public
API method.
|
|
Note this means the serialization of e.g. IntegerRangeField now has
strings for lower and upper, so use to_python when they came back in
(same behaviour as ArrayField, hopefully, from where I also got the
set_attributes_from_name function).
|
|
Use the DjangoJSONEncoder so that datetime and date are encoded
appropriately.
|
|
Provide `contained_by` lookups for the equivalent single valued fields
related to the range field types. This acts as the opposite direction to
rangefield__contains.
With thanks to schinckel for the idea and initial tests.
|
|
|
|
|
|
|
|
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.
|
|
Thanks to DavidMuller for the report.
|
|
|
|
varchar()[] cannot compare itself to text[]
Thanks to joelburton for the patch.
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
|
|
|
|
|