On Mon, 2006-07-24 at 06:30 -0700, sean wrote: > Thanks for the reply. > That solution would involve the object_detail view for the folder, > right? > I am currently using that one, but pagination would be nice to use on > the media list, so I would rather get the object_list working.
In the object_list view, you are given an "object_list" parameter, which is a list of all the objects for that page. To display them, you will be doing something like {% for folder in object_list %} to iterate over that list. Inside that loop, you should then be able to do {% for media in folder.media_set.all %} and so on. > > I don't think I completely understand the queryset parameter. In themeda > tutorial the info_dict is built with something like > Polls.objects.all(). Is this query ever evaluated, because it would > seem a waste of ressources to select all objects just to get the > object_detail view to work? QuerySets are lazy. Since pagination only wants, say, 10 items, it will end up running "queryset[:10]" and only when the results are needed will the query be turned into SQL and run. In this case, that will convert it into a query involving a LIMIT clause, so you don't end up selecting every single result; just the ones you need. Am I making any of this clearer? Or just confusing things further? It's always a bit difficult to know how much detail to put into these postings, so let me know if I've put too little in this case. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---