Per instance dynamic fields django model

Posted by Roberto Rosario on Stack Overflow See other posts from Stack Overflow or by Roberto Rosario
Published on 2010-05-18T04:58:16Z Indexed on 2010/05/18 5:00 UTC
Read the original article Hit count: 250

Filed under:
|
|
|

I have a model with a JSON field or a link to a CouchDB document. I can currently access the dynamic informaction in a way such as:

genericdocument.objects.get(pk=1) == genericdocument.json_field['sample subfield'] instead I would like genericdocument.sample_subfield

to maintain compatibility with all the apps the project currently shares.

© Stack Overflow or respective owner

Related posts about django

Related posts about dynamic