#17727 closed New feature (wontfix)
Multiple values for Fields
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.4-beta-1 |
Severity: | Normal | Keywords: | multiple values |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I think we should support multiple values for fields. Example:
""" <= 0: unlimited, 1: default"""
emails = models.EmailField(max_length=128, limit=5)
Like Drupal is doing, single value field, we store the value in same table; multiple values, we create new table.
Change History (2)
comment:1 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 12 years ago
Component: | ORM aggregation → Database layer (models, ORM) |
---|
Note:
See TracTickets
for help on using tickets.
The normal way to do this in SQL is by using
ForeignKeys
, which you can already do (the limit=5 requires a little validation code, though). What you could have is aListField
containing multiple emails. I think django-nonrel has something like that, and it would be a nice feature when using SQL databases, too.I am going to close this one as wontfix, as the feature as presented doesn't fit into Django.
EmailField
should represent a single value, stored in a single column. It would be nice to be able to doListField(EmailField(), limit=5)
. But the basic fields should remain single-valued.