def update_category_positions(category):
    for i, child in enumerate(Category.objects.filter(parent=category)):
        child.position = (i + 1) * 10
        child.save()
Updates the position of the children of the passed category.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/utils.py/update_category_positions