On 11/3/09, esatterwh...@wi.rr.com <esatterwh...@wi.rr.com> wrote:
>
> You might want to consider installing the debug toolbar (
> http://github.com/robhudson/django-debug-toolbar ).

Yeah, I tried this before but then when you are trying to generate an
Excel spreadsheet somehow it fails to capture the right data and
display it.

>
> it displays the amount of time taken for all of the rendering steps.
> It will defiantly help you narrow down the major culprits.
>
> On Nov 3, 5:12 am, Low Kian Seong <django....@gmail.com> wrote:
>> Pretty much confirmed it's the rendering or pulling of data from database:
>>
>> 1. I tried to render a html page instead of Excel. Same speed. So this
>> kicks out the theory of rending of excel is slowing the page down.
>>
>> 2. I tried shorting out all the data from the rendered page. Page came
>> up in less than 2 seconds. Put back all the data called from the db,
>> whomp! It goes back to 50 seconds.
>>
>> Now debugging the rendering of the template. Could an alternative
>> templating engine like jinja help this?
>>
>> On Tue, Nov 3, 2009 at 6:07 PM, bruno desthuilliers
>>
>>
>>
>>
>>
>> <bruno.desthuilli...@gmail.com> wrote:
>>
>> > On 3 nov, 09:09, Low Kian Seong <django....@gmail.com> wrote:
>> >> But I am confused here. How do iterate through the data another time?
>> >> Do I call the select_related in my views.py code like:
>>
>> >> manager_info = found_entries.select_related()
>>
>> >> then how do i iterate through manager_info in my template?
>>
>> > That's not how it works. The only thing you have to do is to
>> > call .select_related on your queryset - it will take care of
>> > generating a SQL request that follows the relationships. You have
>> > nothing else to do in your template.
>>
>> > ie, in your view:
>>
>> >  objects = MyModel.filter(...).select_related()
>>
>> > And of course, *don't* use len(objects).
>>
>> >http://docs.djangoproject.com/en/dev/ref/models/querysets/#id1
>>
>> --
>> Low Kian Seong
>> blog:http://lowkster.blogspot.com
> >
>


-- 
Low Kian Seong
blog: http://lowkster.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to