While building a website using template inheritance one usually does
the following:

fetch from database
fetch from some more data from database
... << more required computations
then at the end render the template with the fetched data

Without template inheritance one usually does the following:

fetch from database
render this part of the site with this fetched data
fetch some more data from the database
render this other part of the site with the fetched data
...
etc

The first approach is much more elegant and leads to easier to
maintain code. However the user will have to wait till the end of the
fetching (long computations) before any rendering can take place. In
the second approach however the site loads as we are fetching the data
which is more convenient to the user.

Am I correct to assume this? Is there a way to get the best of both
worlds? Maybe using generators? Thank you.

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