On Mar 24, 11:05 am, gchuyun wrote:
> i tried this, but get a error similar.
>
> TypeError: [{'publish_time': datetime.datetime(2009, 3, 24, 16, 16,
> 18), 'is_deleted': 0, 'is_confirmed'
> : 0, 'title': u'1', 'content': u'111', 'id': 1L}, {'publish_time':
> datetime.datetime(2009, 3, 24, 16
> ,
i tried this, but get a error similar.
TypeError: [{'publish_time': datetime.datetime(2009, 3, 24, 16, 16,
18), 'is_deleted': 0, 'is_confirmed'
: 0, 'title': u'1', 'content': u'111', 'id': 1L}, {'publish_time':
datetime.datetime(2009, 3, 24, 16
, 27, 50), 'is_deleted': 0, 'is_confirmed': 0, 'titl
On Mar 14, 10:14 pm, MartinBorthiry wrote:
> Hello:
>
> I'm Trying to serialize a dict which have a list of Model's instance.
> The format that i need is json. Something like that:
>
> people = Person.objects.all()
Why don't you use Person.objects.values()?
You will get a list of dicts s
On 15 mar, 18:39, MartinBorthiry wrote:
(snip)
> Bruno, Thank you for your reply.
> I tried your snipper, but I had the same error.
Uh ?
How did you try it (please provide relevant code) ? This code is used
in production and AFAICT, it JustWork(tm), so if you happened to find
a bug, I'd rea
> > I'm Trying to serialize a dict which have a list of Model's instance.
> > The format that i need is json. Something like that:
>
> > people = Person.objects.all()
> > res = {'res':0, 'msg':'Ok','data': people}
>
> > but, i need that result:
> > {'res':0, 'msg':'
On 14 mar, 22:14, MartinBorthiry wrote:
> Hello:
>
> I'm Trying to serialize a dict which have a list of Model's instance.
> The format that i need is json. Something like that:
>
> people = Person.objects.all()
> res = {'res':0, 'msg':'Ok','data': people}
>
> but, i need that
Hello:
I'm Trying to serialize a dict which have a list of Model's instance.
The format that i need is json. Something like that:
people = Person.objects.all()
res = {'res':0, 'msg':'Ok','data': people}
but, i need that result:
{'res':0, 'msg':'Ok','data': [{'id':1
7 matches
Mail list logo