summaryrefslogtreecommitdiff
path: root/tests/invalid_models_tests/test_relative_fields.py
AgeCommit message (Collapse)Author
2023-02-01[4.2.x] Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0 Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main
2022-12-28Fixed #18468 -- Added support for comments on columns and tables.kimsoungryoul
Thanks Jared Chung, Tom Carrick, David Smith, Nick Pope, and Mariusz Felisiak for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-10-06Fixed #33131 -- Improved error messages for clashing reverse accessor names.Bernd Wechner
2021-09-09Fixed #33084 -- Removed incorrect system check for ManyToManyField with ↵Hasan Ramezani
limit_choices_to.
2021-08-06Fixed #32983 -- Added system check for redundant related_name on symmetrical ↵Nick Touran
M2M fields. Since ManyToManyFields defined with `symmetrical=True` do not add a related field to the target model, including a `related_name` argument will never do what the coder likely expects. This makes including a related_name with a symmetrical model raise a system check warning. ticket-32983
2020-12-30Fixed #32294 -- Prevented ManyToManyField's hidden related name collisions ↵manav014
between apps.
2020-12-29Added app labels to related fields checks messages E302-E305.Mariusz Felisiak
2020-02-28Fixed #31310 -- Fixed hints in checks for using intermediate model with ↵Matheus Cunha Motta
ambiguous foreign key. symmetrical=False is not required since 87b1ad6e7351464c60e751b483d9dfce3a2d3382.
2020-02-28Refs #31310 -- Added test for check for using intermediate model with ↵Matheus Cunha Motta
ambiguous foreign key from model.
2020-02-27Fixed #31185 -- Fixed detecting of unique fields in ForeignKey/ForeignObject ↵Valze
checks when using Meta.constraints.
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2020-01-16Fixed #29998 -- Allowed multiple OneToOneFields to the parent model.Mariusz Felisiak
We assumed that any OneToOneField's in a child model must be the parent link and raised an error when parent_link=True was not specified. This patch allows to specify multiple OneToOneField's to the parent model. OneToOneField's without a custom related_name will raise fields.E304 and fields.E305 so this should warn users when they try to override the auto-created OneToOneField.
2019-06-21Fixed #30421 -- Allowed symmetrical intermediate table for self-referential ↵Nadège Michel
ManyToManyField.
2019-01-14Refs #28478 -- Prevented database feature based skipping on tests ↵Simon Charette
disallowing queries. Database features may require a connection to be established to determine whether or not they are enabled.
2017-07-11Made assertions in invalid_models_tests consistent.Adam Johnson
2017-03-11Fixed #27904 -- Added a system check that Field.validators are callable.Adam Chainz
2017-01-19Refs #23919 -- Removed str() conversion of type and method __name__.Simon Charette
2017-01-18Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2017-01-17Refs #21127 -- Required on_delete for ForeignKey/OneToOneField.Tim Graham
Per deprecation timeline.
2016-11-22Fixed #27295 -- Added a system check to prohibit model names that start or ↵Quentin Fulsher
end with an underscore or contain double underscores.
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-08-16Moved model_validation tests to invalid_models_tests.Tim Graham
2016-07-21Refs #26796 -- Fixed ManyToManyField's limit_choices_to warning without a ↵Kevan Swanberg
through model.
2016-07-08Fixed #26796 -- Added a system check for m2m fields with ignored ↵Anderson Resende
limit_choices_to.
2016-06-30Fixed #25292 -- Fixed crash in ManyToManyField.through_fields check.Andrew Nester
2016-06-09Fixed #26648 -- Added a system check for invalid related_query_name's ↵Michal Petrucha
containing underscores.
2016-06-09Fixed #26718 -- Added system check for existence of the fields specified by ↵Sergey Fedoseev
ForeignKey.to_field.
2016-04-08Fixed E128 flake8 warnings in tests/.Tim Graham
2016-02-12Removed unneeded hint=None/obj=None in system check messages.Tim Graham
2016-02-08Fixed #26162 -- Checked query name clashes of hidden relationships.Simon Charette
Although reverse accessor clashes should be skipped query name can't be hidden. Thanks to Ian Foote and Tim Graham for the review.
2016-01-29Refs #26022 -- Used context manager version of assertRaisesMessage in tests.Hasan
2016-01-06Fixed #25746 -- Isolated inlined test models registration.Simon Charette
Thanks to Tim for the review.
2015-12-24Fixed #25981 -- Added need to update migrations to on_delete deprecation ↵Luis San Pablo
warning.
2015-12-03Fixed many spelling mistakes in code, comments, and docs.Josh Soref
2015-11-11Fixed #25723 -- Made related field checks lookup against their local apps.Simon Charette
2015-10-16Fixed #25560 -- Made empty string related_name invalid.Simon Charette
Thanks to Ali Lotfi for the initial report and patch and Tim Graham for the review.
2015-10-14Refs #25535 -- Minor edits to ForeignObject check changes.Tim Graham
2015-10-12Fixed #25535 -- Made ForeignObject checks less strict.Antoine Catton
Check that the foreign object `from_fields` are a subset of any unique constraints on the foreign model.
2015-10-06Fixed #25503 -- Fixed system check crash on ForeignKey to abstract model.Mariusz Felisiak
2015-09-12Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-06-26Fixed #25016 -- Reallowed non-ASCII values for ForeignKey.related_name on ↵薛丞宏
Python 3.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-10-04Fixed #22064 -- Add check for related_nameAndré Ericson
Validates that related_name is a valid Python id or ends with a '+' and it's not a keyword. Without a check it passed silently leading to unpredictable problems. Thanks Konrad Świat for the initial work.
2014-07-09Fixed #19671 -- Added warnings that null and validators are ignored for ↵Anubhav Joshi
ManyToManyField. Thanks Loic Bistuer and Tim Graham for help and review.
2014-03-12Flake8 correctionsShai Berger
2014-03-11Fixed #22217 - ManyToManyField.through_fields fixes.Akis Kesoglou
- Docs description of arguments mix up. - Keep it from erroneously masking E332 check. - Add checks E338 and E339, tweak message of E337.