summaryrefslogtreecommitdiff
path: root/tests/model_fields
AgeCommit message (Collapse)Author
2016-04-29[1.8.x] Fixed #26557 -- Converted empty strings to None when saving ↵Joshua Phillips
GenericIPAddressField. Backport of 4681d65048ca2553895e10c2c492997b0a78ffba from master
2016-03-10[1.8.x] Fixed #26324 -- Fixed DurationField with fractional seconds on SQLite.Tim Graham
Backport of 4f0cd0fd162122da96978b357ac9fc9534529410 from master
2016-02-23[1.8.x] Fixed many spelling mistakes in code, comments, and docs.Josh Soref
Partial backport of 93452a70e8a62c7408eeded444f5088d4a26212d from master
2015-11-24[1.8.x] Fixed #25767 -- Fixed data truncation possibility with ↵George Marshall
Positive(Small)IntegerField on MySQL. Backport of 710e11d076b9e5ef3e3b486dfb70bb55b788691c from master
2015-08-10[1.8.x] Fixed #25160 -- Moved unsaved model instance data loss check to ↵Tim Graham
Model.save() This mostly reverts 5643a3b51be338196d0b292d5626ad43648448d3 and 81e1a35c364e5353d2bf99368ad30a4184fbb653. Thanks Carl Meyer for review. Backport of 5980b05c1fad69eef907e0076aa2dc837edab529 from master
2015-06-15[1.8.x] Fixed flake8 warnings on Python 3.Tim Graham
Backport of 47fcbe506c04019a12e16221843e25a52249b1ab from master
2015-05-12[1.8.x] Fixed #24698, #24712 -- Added ForeignKey.get_db_prep_value()Abhaya Agarwal
Fixed crashes with ForeignKey to UUIDField and inheritance with UUIDField primary keys.
2015-04-28[1.8.x] Fixed #24714 -- Used more specific assertions than assertEqual in tests.Alasdair Nicol
Backport of eaeea6f94701547ce1b50dbcf5cf71460e9e4c91 from master
2015-04-27[1.8.x] Used assertIsInstance in tests.Alasdair Nicol
Backport of d91321e8be0d8e52546026d461b14157d565870c from master
2015-04-20[1.8.x] Fixed #24667 --- Repaired model_fields cardinality testYoong Kang Lim
Backport of 36eab95e7fde7fad4368192ddbef4e2dbb32dc91 from master
2015-04-15[1.8.x] Fixed model_fields tests to use django TestCase.Jon Dufresne
Backport of 97bb48d9ba864060d57a3137fb9c456b98ecc79b from master
2015-04-13[1.8.x] Fixed #24611 -- Fixed update() crash with related UUID pk object.Jay Wineinger
Backport of 923da0274a9a8c4ef2ac9776f71bd14628e39fc3 from master
2015-02-23[1.8.x] Guaranteed removal of temporary files during tests.Aymeric Augustin
Dropped the DJANGO_TEST_TEMP_DIR environment variable. Before this change, proper removal depended on the developer passing dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions. Backport of 934400759de817471ff37d736686201d7ae34e82 from master
2015-02-21[1.8.x] Fixed #24376 -- added verbose_name arg to UUIDFieldMichael Angeletti
Backport of ea3168dc6ced391d848c511a14cfcecfeac9d401 from master
2015-02-20[1.8.x] Fixed #24343 -- Ensure db converters are used for foreign keys.Marc Tamlyn
Joint effort between myself, Josh, Anssi and Shai. Conflicts: django/db/models/query.py tests/model_fields/models.py Backport of 4755f8fc25331c739a6f932cc8aba0cc9e62e352 from master.
2015-02-14[1.8.x] Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.Loic Bistuer
Thanks Carl Meyer and Tim Graham for the reviews and to all involved in the discussion. Backport of 18c0aaa9123579375294fcc4a8ee7e3530176b88 from master
2015-02-13[1.8.x] Fixed #24319 -- Added validation for UUID model fieldJosh Smeaton
Backport of de0241eb985c6dec978beda119fee353ef3e9604 from master
2015-02-09[1.8.x] Sorted imports with isort; refs #23860.Tim Graham
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
2015-02-09[1.8.x] Fixed #24302 -- Added DurationField.formfield()Tim Graham
Backport of 2d7c27d3870e57edd1b2ac46b49f0a8804753a1e from master
2015-02-06[1.8.x] Fixed E265 comment styleCollin Anderson
Backport of db77915c9fd35a203edd8206f702ee4082f04d4a from master
2015-02-05[1.8.x] Added UUIDField.deconstruct()Tim Graham
Backport of 0f54cf28c09a80254571487e3af93be2096cfdac from master
2015-02-03[1.8.x] Fixed #23617 -- Added get_pk_value_on_save()Anssi Kääriäinen
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. Backport of 8adc59038cdc6ce4f9170e4de2d716d940e136b3 from master
2015-01-20[1.8.x] Fixed typos in code comments.Adam Taylor
Backport of 039465a6a7a18f48ea77ceadb6949990c0ec92e1 from master
2015-01-16Fixed #24092 -- Widened base field support for ArrayField.Marc Tamlyn
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-11Removed supports_binary_field flag as all backends support themClaude Paroz
It was mainly for MySQL on Python 3, but now the current recommended MySQL driver for Python 3 (mysqlclient) does support binary fields, it is unneeded. Refs #20377.
2015-01-07Refs #2443 -- Allowed creation of objects with NULL DurationFieldsMichał Modzelewski
2015-01-07Fixed #24078 -- Removed empty strings from GenericIPAddressFieldJosh Smeaton
2015-01-06Fixed #12663 -- Formalized the Model._meta API for retrieving fields.Daniel Pyrathon
Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
2015-01-06Removed warning handling that should have been removed in refs #23891.Tim Graham
2015-01-01Fixed #23891 -- Moved deprecation of IPAddressField to system check framework.Tim Graham
Thanks Markus Holtermann for review.
2014-12-30Applied ignore_warnings to Django testsClaude Paroz
2014-12-20Fixed #2443 -- Added DurationField.Marc Tamlyn
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.
2014-12-12Fixed #23455 -- Accept either bytes or text for related_name, convert to text.Carl Meyer
2014-11-27Fixed #23338 -- Added warning when unique=True on ForeigKeyDiego Guimarães
Thanks Jonathan Lindén for the initial patch, and Tim Graham and Gabe Jackson for the suggestions.
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-09-16Fixed #19463 -- Added UUIDFieldMarc Tamlyn
Uses native support in postgres, and char(32) on other backends.
2014-08-05Removed code that assumed BooleanField could be null.Tim Graham
Such a field will no longer pass model validation.
2014-07-31Fixed flake8 warnings.Tim Graham
2014-07-30Fixed the previous commit for Python3.Florian Apolloner
2014-07-30Fixed #23112 -- Field.get_choices tries to index an iterableareski
2014-07-30Fixed flake8 errors.Tim Graham
2014-07-27Fixed #23098 -- Checked that lazy choices are not evaluated too soonFlorian Apolloner
Thanks Matthieu Agopian for the report.
2014-06-23Created import-time test temp dirs in known locationClaude Paroz
Refs #17215. In the same spirit as 5de31cb8cb.
2014-05-26Fixed a few ResourceWarning in the test suite. Refs #22680.Loic Bistuer
2014-05-16Fixed #18389 -- Fixed the way contribute_to_class is calledVlad Starostin
Now this method is only called only if the object is an instance. This allows to have field classes as model class attributes.
2014-05-08Replaced vendor checks by three feature flags.Aymeric Augustin
2014-04-26Fix many many typos in comments throughout the codebaseAlex Gaynor
2014-04-21Fixed queries that may return unexpected results on MySQL due to typecasting.Erik Romijn
This is a security fix; disclosure to follow shortly.
2014-04-09Used more specific test assertions.Aymeric Augustin
2014-03-25Fixed #12030 -- Validate integer field range at the model level.Simon Charette
Thanks to @timgraham for the review.