Both, actually. The OP is looping through his cats and pages querysets
multiple times unnecessarily. That can get very inefficient as those
database tables get bigger.
On Friday, May 12, 2017 at 6:04:01 PM UTC+2, sacrac wrote:
>
> {% regroup %} is elegantly or more optimized???
>
> On Fri, May
{% regroup %} is elegantly or more optimized???
On Fri, May 12, 2017 at 5:05 AM, wrote:
> You can look into the {% regroup %} template tag. It will do what you are
> trying to do more elegantly.
>
>
>
> On Wednesday, May 10, 2017 at 7:40:26 PM UTC+2, Michael Smith wrote:
>>
>> I'm following the
You can look into the {% regroup %} template tag. It will do what you are
trying to do more elegantly.
On Wednesday, May 10, 2017 at 7:40:26 PM UTC+2, Michael Smith wrote:
>
> I'm following the latest Tango book and was experimenting with different
> ways of looping through categories and subca
I'm following the latest Tango book and was experimenting with different
ways of looping through categories and subcategories to create a list. I
have a 'Category' and 'Page' model, where Page has a foreign key to
Category's ID. To display a list with sub-bullets I simply passed all
categorie
4 matches
Mail list logo