diff options
| author | Donald Stufft <donald@stufft.io> | 2013-05-17 15:31:41 -0400 |
|---|---|---|
| committer | Donald Stufft <donald@stufft.io> | 2013-05-18 11:14:05 -0400 |
| commit | a19e9d80ffa10f8da43addcaa4ddd440beee8a4d (patch) | |
| tree | 6c405ce14256de50c1e4a394514a6daaa0410e50 /tests/invalid_models | |
| parent | a0c0cc924e4c6ffd22158f254ed9bc9556f05cc4 (diff) | |
Fixed #20430 - Enable iterable of iterables for model choices
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
Diffstat (limited to 'tests/invalid_models')
| -rw-r--r-- | tests/invalid_models/invalid_models/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/invalid_models/invalid_models/models.py b/tests/invalid_models/invalid_models/models.py index 3c21e1ddb8..6ba3f04e5e 100644 --- a/tests/invalid_models/invalid_models/models.py +++ b/tests/invalid_models/invalid_models/models.py @@ -375,8 +375,8 @@ invalid_models.fielderrors: "decimalfield3": DecimalFields require a "max_digits invalid_models.fielderrors: "decimalfield4": DecimalFields require a "max_digits" attribute value that is greater than or equal to the value of the "decimal_places" attribute. invalid_models.fielderrors: "filefield": FileFields require an "upload_to" attribute. invalid_models.fielderrors: "choices": "choices" should be iterable (e.g., a tuple or list). -invalid_models.fielderrors: "choices2": "choices" should be a sequence of two-tuples. -invalid_models.fielderrors: "choices2": "choices" should be a sequence of two-tuples. +invalid_models.fielderrors: "choices2": "choices" should be a sequence of two-item iterables (e.g. list of 2 item tuples). +invalid_models.fielderrors: "choices2": "choices" should be a sequence of two-item iterables (e.g. list of 2 item tuples). invalid_models.fielderrors: "index": "db_index" should be either None, True or False. invalid_models.fielderrors: "field_": Field names cannot end with underscores, because this would lead to ambiguous queryset filters. invalid_models.fielderrors: "nullbool": BooleanFields do not accept null values. Use a NullBooleanField instead. |
