Re: Ajax request, json object, fields with instance of inherits class converted in regular string

2010-02-22 Thread esatterwh...@wi.rr.com
you can also use simplejson and return data the way you want it. It isn't able to serialize date or time objects natively but this still covers 99% of the cases. from django.utils import simplejson from django.http import HttpResponse def view(request): return

Re: Ajax request, json object, fields with instance of inherits class converted in regular string

2010-02-21 Thread Kev Dwyer
On Fri, 19 Feb 2010 07:00:36 -0800, manixor wrote: > > The very big problem is, when I loop into object on template, in the > monday field is not enymore the Day instance, but the string 1. How can > I convert to an json object the week object, and to keep the instance of > the inherits class,

Ajax request, json object, fields with instance of inherits class converted in regular string

2010-02-19 Thread manixor
Hello all, I have a really big problem with ForeignKey Models. I will try to emplain my problem: I have a class like this: class Day(models.Model): name= models.CharField(_('Name'), max_length=32, unique=True) description = models.TextField(_('Description'),