book_category_list=[]
for book_category in BookCategory.objects.filter(parent__isnull = True):
book_category_list.append(book_category.get_family())**
now the book_category_list
in tree query set format. I need to list categories in a tree structure. So I need to convert this book_category_list
into dictionary format. BookCategory is an MPTT Model?