Opened 9 years ago
Closed 9 years ago
#26528 closed Cleanup/optimization (fixed)
Allow model/form Field validators kwarg to be any iterable
Reported by: | Loic Bistuer | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.9 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Requiring a list
is a side effect of concatenating the validators
kwarg with the field's default_validators
which happens to be a list
.
Requiring a specific type of iterables is not very pythonic.
Change History (3)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Summary: | Fields' validators kwarg must be list. → Allow model/form Field validators kwarg to be any iterable |
Triage Stage: | Unreviewed → Ready for checkin |
Note:
See TracTickets
for help on using tickets.
PR https://github.com/django/django/pull/6486.