def get_slug_from_request(request):
    """Returns the slug of the currently displayed category.
    """
    slug = request.path.split("/")[-1]
    try:
        int(slug)
    except __HOLE__:
        pass
    else:
        slug = request.path.split("/")[-2]

    return slug
dataset/ETHPy150Open diefenbach/django-lfs/lfs/core/templatetags/lfs_tags.py/get_slug_from_request