On 2/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>
> limodou wrote:
> > On 2/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
> >> hey everyone,
> >>
> >>
> >> 1. is there any way to serialize models and remove some fields? I.e. I
> >> would like to serialize User for example, but I definitely don't want
> >> the email to be there.
> >>
> >> 2. is there a way to provide "custom" parts of the serialization? For
> >> example, when serializing a Book I would like to see it's "tags" even if
> >> they are just an array of tags without tag-id etc etc
> >>
> >> In general I would like to create some API pages that dump JSON. It
> >> would be great to be able to specify which parts of an object are
> >> "private" and which are "public" and which are "additional" so I could
> >> automatically do this.
> >>
> >> Any hints appreciated!
> >>
> > you can just create your own dict variable, and then using simplejson
> > to convert it to json
>
> Of course, but that's exactly what I'm trying to avoid...
>
django also uses simplejson to dump python variable, why you want to
avoid it? And I think using simplejson is more flexiable and simple.

-- 
I like python!
UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

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

Reply via email to