Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#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 Anssi Kääriäinen, 13 years ago

Resolution: wontfix
Status: newclosed

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 a ListField 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 do ListField(EmailField(), limit=5). But the basic fields should remain single-valued.

comment:2 by Anssi Kääriäinen, 12 years ago

Component: ORM aggregationDatabase layer (models, ORM)
Note: See TracTickets for help on using tickets.
Back to Top