i'm watching the ticket right now.
maybe there is no need to to create a class
JSONDateEncoder(json.JSONEncoder) because there is DjangoJSONEncoder
already.
then it would be great to implement a lazy translation object for
DjangoJSONEncoder to store ugettext_lazy objects.

for me there is no need to create set_%s_json and get_%s_json method
because the field should handle it directly, and we should use the
to_python method, like all other fields in django.

for example the datetime field directly push a datetime object to the
model (using to_python) and transform it to a string when we call save
method.

we should use the same logic here and encode a json object to string
only when we call the save method, no need for a get_%s_json in the
field api.

On 6 Nov, 01:36, Russell Keith-Magee <russ...@keith-magee.com> wrote:
> On Sat, Nov 5, 2011 at 7:48 PM, Ric <riccardodivirgi...@gmail.com> wrote:
> > this is my proposition to have custom data inside a model field
>
> > a json data field, the code is simple as this, and it works with
> > lastest django release
>
> See #12990 -- this is a ticket that has requested exactly this feature.
>
> You'll also see that with one exception, the core team have all been
> -1 or -0 on this idea.
>
> Yours,
> Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to