Opened 15 years ago

Closed 15 years ago

#11913 closed (wontfix)

Storing dictionaries and ordered lists in database

Reported by: jits_1998 Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Keywords:
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 would like to have a feature which can directly store dictionaries into the database. eg. My user has multiple addresses, so I can have a dictionary with keys as "home"/"office" etc, and the address object as values.

Also, a similar feature would be to have ordered list of objects.

Currently we store the many-to-one etc relationships in a table, for the above requirements we need to add another column for keys/index.

The value need not be a complex object, it can be a simple string or a number.

Change History (2)

comment:1 by jits_1998, 15 years ago

milestone: 1.2

comment:2 by James Bennett, 15 years ago

Resolution: wontfix
Status: newclosed

Sounds like what you really want is an ordered many-to-many relation. Some further solutions are here: http://stackoverflow.com/questions/402217/how-to-store-a-dictionary-on-a-django-model

Meanwhile, this has been proposed before, and I think Russ' comment stands: http://groups.google.com/group/django-developers/browse_thread/thread/61f5a5b32c8d8941/d15b85ce21f5a4be

Note: See TracTickets for help on using tickets.
Back to Top