def set_category_levels():
    from lfs.catalog.models import Category
    for category in Category.objects.all():
        category.level = len(category.get_parents()) + 1
        category.save()
.. todo::
dataset/ETHPy150Open diefenbach/django-lfs/lfs/core/utils.py/set_category_levels--crossover with--dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/sandbox/cuda_convnet/response_norm.py/CrossMapNorm.__str__