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'), max_length=1024

Delete a data row that is inherit by another one.

2010-02-14 Thread manixor
Hy, how can I check if a field is inherit by another one. If I delete that field, it delete cascade, the foreign data too. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To uns

How to build an json object that contain objects class and dictionary.

2010-02-10 Thread manixor
Hello all, I need to send with HttpResponse an json object. I need to have there more then one objects class(myclass.objects.all()) and a dictionary. To have only objects I can do like this: ob1 = cl1.objects.all() ob2 = cl2.objects.all() all_ob = list(ob1) all_ob +=list(ob2) return HttpRespons