>
> You are probably getting this error because when you generate your list 
> from categories. you are adding sub categories as list. so your list will 
> be like following 
>

> [cat1,cat2,cat3,[subcat1,subcat2],[subcat3,subcat4]]
>
Yes, mistake was here. Now i solve it with check "if type(item) is list:" 
Using one flat list can't help me, couse i need to build tree with few 
levels. 

Lastly please check this https://github.com/django-mptt/django-mptt
>
> this is great for categories. this is good for keeping trees in relational 
> databases. when you query sub trees, it will do exactly one query every 
> time.
> and there is a generic category app too if you need.
>
> https://github.com/callowayproject/django-categories
>
> I hope that helps.
>

Thx for advice. I will look over it. But i write my custom template for 
learning and understanding django+python. Couse using ready apps cant let 
me do it :)

All my questions are answered, so thanks for help!

God bless friendliness community :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/hcVaDr06AHoJ.
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