Did I find the right examples for you? yes no

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)

src/d/j/django-lfs-0.7.7/lfs/manage/categories/category.py   django-lfs(Download)
    """
    try:
        category = Category.objects.all()[0]
    except IndexError:
        url = reverse("lfs_manage_no_categories")

src/d/j/django-lfs-HEAD/lfs/manage/categories/category.py   django-lfs(Download)
    """
    try:
        category = Category.objects.all()[0]
    except IndexError:
        url = reverse("lfs_manage_no_categories")

src/l/f/lfs-HEAD/manage/views/categories/category.py   lfs(Download)
    """
    try:
        category = Category.objects.all()[0]
    except IndexError:
        url = reverse("lfs_manage_add_top_category")

src/d/j/django-lfs-0.7.7/lfs/core/utils.py   django-lfs(Download)
def set_category_levels():
    """Sets the category levels based on the position in hierarchy.
    """
    for category in Category.objects.all():
        category.level = len(category.get_parents()) + 1

src/d/j/django-lfs-HEAD/lfs/core/utils.py   django-lfs(Download)
def set_category_levels():
    """Sets the category levels based on the position in hierarchy.
    """
    from lfs.catalog.models import Category
    for category in Category.objects.all():

src/l/f/lfs-HEAD/core/utils.py   lfs(Download)
def set_category_levels():
    """Creates category levels based on the position in hierarchy.
    """
    for category in Category.objects.all():
        category.level = len(category.get_parents()) + 1

src/d/j/django-lfs-0.7.7/lfs/core/sitemap.py   django-lfs(Download)
    def items(self):
        return Category.objects.all()
 
    def lastmod(self, obj):
        return datetime.now()

src/d/j/django-lfs-0.7.7/lfs/caching/listeners.py   django-lfs(Download)
    cache.delete("%s-category-categories-%s" % (settings.CACHE_MIDDLEWARE_KEY_PREFIX, instance.slug))
 
    for category in Category.objects.all():
        cache.delete("%s-categories-portlet-%s" % (settings.CACHE_MIDDLEWARE_KEY_PREFIX, category.slug))
 

src/d/j/django-lfs-HEAD/lfs/core/sitemap.py   django-lfs(Download)
    def items(self):
        return Category.objects.all()
 
    def lastmod(self, obj):
        return datetime.now()

src/d/j/django-lfs-HEAD/lfs/caching/listeners.py   django-lfs(Download)
    cache.delete("%s-category-categories-%s" % (settings.CACHE_MIDDLEWARE_KEY_PREFIX, instance.slug))
 
    for category in Category.objects.all():
        cache.delete("%s-categories-portlet-%s" % (settings.CACHE_MIDDLEWARE_KEY_PREFIX, category.slug))
 

  1 | 2  Next