Added fix_init_kwarg method to JSONField and connected it to the pre_init signal...
authorStephen Burrows <stephen.r.burrows@gmail.com>
Fri, 14 Jan 2011 19:58:53 +0000 (14:58 -0500)
committerStephen Burrows <stephen.r.burrows@gmail.com>
Fri, 14 Jan 2011 19:58:53 +0000 (14:58 -0500)
commit4d7f6c42629cb85f001306195c6098b4abec642a
treed99ff8543808cef104b1ed503647b37f886bbc39
parent26c548c5fe8c7cc7227b5f38cd27e0278442dd76
Added fix_init_kwarg method to JSONField and connected it to the pre_init signal during contribute_to_class - this effectively mimics what django does for RelatedObject fields in Model.__init__ by allowing a python value to be passed in to the constructor (e.g. JSONValue(value={}) instead of JSONValue(value_json='{}')). This resolves issue 68.
models/base.py
models/fields.py