Add validators
This commit is contained in:
parent
c91994d041
commit
9e7563e38e
4 changed files with 20 additions and 15 deletions
|
@ -15,7 +15,8 @@ def index(request):
|
|||
children = []
|
||||
for child in Category.objects.filter(parent=cat):
|
||||
children += _cat_list(child)
|
||||
if len(children) == 0: return cat.name,
|
||||
if len(children) == 0:
|
||||
return (cat.name,)
|
||||
return cat.name, children
|
||||
|
||||
_cats = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue