summaryrefslogtreecommitdiff
path: root/tests/model_fields/tests.py
AgeCommit message (Collapse)Author
2018-11-27Switched TestCase to SimpleTestCase where possible in Django's tests.Tim Graham
2018-11-14Fixed #29835 -- Made RelatedFieldListFilter respect ModelAdmin.ordering.Hasan Ramezani
2018-04-20Fixed #29247 -- Allowed blank model field choice to be defined in nested ↵orlnub123
choices.
2018-04-20Moved tests for model Field.get_choices().Tim Graham
2017-06-26Removed unnecessary empty parentheses in class definitions.Jon Dufresne
2017-06-14Fixed #27914 -- Added support for nested classes in ↵chillaranand
Field.deconstruct()/__repr__().
2017-05-11Fixed #28188 -- Fixed crash when pickling model fields.Tim Graham
Regression in d2a26c1a90e837777dabdf3d67ceec4d2a70fb86. Thanks Adam Alton for the report and test, and Adam Johnson for suggesting the fix.
2017-03-23Fixed #27969 -- Fixed models.Field.formfield() setting 'disabled' for fields ↵Kapil Garg
with choices.
2017-01-17Refs #26154 -- Removed deprecated CommaSeparatedIntegerField.Tim Graham
2016-12-14Fixed #27599 -- Fixed Field.__str__() crash for fields not attached to models.Morgan Aubert
2016-12-14Moved test_field_ordering to the model_fields package.Morgan Aubert
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-03-23Split model_fields tests into different files.Tim Graham
2016-02-29Fixed #26186 -- Documented how app relative relationships of abstract models ↵Simon Charette
behave. This partially reverts commit bc7d201bdbaeac14a49f51a9ef292d6312b4c45e. Thanks Tim for the review. Refs #25858.
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2016-01-11Fixed #25858 -- Bound abstract model application relative relationships.Simon Charette
Thanks to Karl Hobley for the report and Markus, Shai, Aymeric for their input and Tim for the review.
2016-01-06Fixed #25746 -- Isolated inlined test models registration.Simon Charette
Thanks to Tim for the review.
2015-12-05Fixed #25547 -- Made Model.refresh_from_db() update FileField's instance.Attila Tovt
2015-11-24Fixed #25767 -- Fixed data truncation possibility with ↵George Marshall
Positive(Small)IntegerField on MySQL.
2015-09-22Fixed #24509 -- Added Expression support to SQLInsertCompilerAlex Hill
2015-09-18Fixed #24636 -- Added model field validation for decimal places and max digits.Iulia Chiriac
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-08-03Removed unused Field.get_flatchoices() method.Tim Graham
Unused since c2ba59fc1da5287d6286e2c2aca4083d5bafe056 (Django 1.0). Thanks Andy Baker for the report.
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-07-17Fixed #16501 -- Added an allow_unicode parameter to SlugField.Edward Henderson
Thanks Flavio Curella and Berker Peksag for the initial patch.
2015-06-15Fixed flake8 warnings on Python 3.Tim Graham
2015-06-04Fixed #24677 -- Made TextField.to_python() return a string.Rolo
This is consistent with CharField.
2015-06-02Fixed #9596 -- Added date transform for DateTimeField.Jon Dufresne
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-04-28Fixed #24714 -- Used more specific assertions than assertEqual in tests.Alasdair Nicol
2015-04-15Fixed model_fields tests to use django TestCase.Jon Dufresne
2015-03-25Fixed #24215 -- Refactored lazy model operationsAlex Hill
This adds a new method, Apps.lazy_model_operation(), and a helper function, lazy_related_operation(), which together supersede add_lazy_relation() and make lazy model operations the responsibility of the App registry. This system no longer uses the class_prepared signal.
2015-03-25Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen
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.
2015-03-24Fixed #24483 -- Prevented keepdb from breaking with generator choices.David Szotten
If Field.choices is provided as an iterator, consume it in __init__ instead of using itertools.tee (which ends up holding everything in memory anyway). Fixes a bug where deconstruct() was consuming the iterator but bypassing the call to `tee`.
2015-02-21Fixed #24376 -- added verbose_name arg to UUIDFieldMichael Angeletti
2015-02-12Refs #24215 -- Prevented pending lookup pollution by abstract models.Simon Charette
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-20Fixed typos in code comments.Adam Taylor
2015-01-19Removed IPAddressField per deprecation timeline; refs #20439.Tim Graham
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-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-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-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-08-05Removed code that assumed BooleanField could be null.Tim Graham
Such a field will no longer pass model validation.
2014-07-30Fixed #23112 -- Field.get_choices tries to index an iterableareski