The code is something like this obj=DBModels.objects.filter(somefilter) results=[] for o in obj: results.append({'field1':o.field1,'field2':o.field2})
return JsonResponse(results) where JsonResponse is a class derived from HttpResponse that add a simplejson.dumps I have a really large database and in some edge case I need to return a large number of results (about 150.000 when I get the error). I make only one query with select_related and I tried also with DEBUG=False but nothing changed only the detailed stack trace isn't printed, thanks drakkan On 5 Ago, 21:02, Peter Herndon <tphern...@gmail.com> wrote: > On 08/05/2009 12:26 PM, drakkan wrote:> No I'm not serving static file I have > a very large json file > > dinamycally generated (based on a db query) > > Please post the relevant view and model code, so we can see what's > happening. Also, if your db query is actually a really large number of > db queries, and you are running in debug mode (DEBUG = True in > settings), then Django caches all of your SQL queries to assist with > debugging -- at the expense of memory and performance. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---