Tuesday, March 22, 2016

HStoreField - Field value is an object usually, but a string when in shell

I'm working with a model that has an HStoreField field named "options". The options field on a model instance is a dictionary when running the webserver, but is a string when in the shell. This isn't simply a matter of it being coerced by the shell; the model's attribute dictionary and dir() calls against the member both indicate that options is a string.

Any thoughts on why this might behave differently? Nothing jumped out at me in the Django source.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a166c813-3cb0-4cf3-bbb2-d460cc70524f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment