Did I find the right examples for you? yes no

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

src/d/j/django-lfs-0.7.7/lfs/manage/categories/category.py   django-lfs(Download)
def manage_category(request, category_id, template_name="manage/category/manage_category.html"):
    """Displays the form to manage the category with given category id.
    """
    category = Category.objects.get(pk=category_id)
 
    This is used as a part of the whole category form.
    """
    category = Category.objects.get(pk=category_id)
 
    if request.method == "POST":
    products are displayed by slug, for the manager by id).
    """
    category = Category.objects.get(pk=category_id)
    url = reverse("lfs.catalog.views.category_view", kwargs={"slug": category.slug})
    return HttpResponseRedirect(url)
def edit_category_data(request, category_id, template_name="manage/category/data.html"):
    """Updates the category data.
    """
    category = Category.objects.get(pk=category_id)
 
    else:
        try:
            parent = Category.objects.get(pk=category_id)
        except ObjectDoesNotExist:
            parent = None

src/d/j/django-lfs-HEAD/lfs/manage/categories/category.py   django-lfs(Download)
def manage_category(request, category_id, template_name="manage/category/manage_category.html"):
    """Displays the form to manage the category with given category id.
    """
    category = Category.objects.get(pk=category_id)
 
    This is used as a part of the whole category form.
    """
    category = Category.objects.get(pk=category_id)
 
    if request.method == "POST":
    products are displayed by slug, for the manager by id).
    """
    category = Category.objects.get(pk=category_id)
    url = reverse("lfs_category", kwargs={"slug": category.slug})
    return HttpResponseRedirect(url)
def edit_category_data(request, category_id, template_name="manage/category/data.html"):
    """Updates the category data.
    """
    category = Category.objects.get(pk=category_id)
 
    else:
        try:
            parent = Category.objects.get(pk=category_id)
        except ObjectDoesNotExist:
            parent = None

src/l/f/lfs-HEAD/manage/views/categories/category.py   lfs(Download)
def manage_category(request, category_id, template_name="manage/category/manage_category.html"):
    """Displays the form to manage the category with given category id.
    """
    category = Category.objects.get(pk=category_id)
 
    This is used as a part of the whole category form.
    """
    category = Category.objects.get(pk=category_id)
    form = CategoryForm(instance=category)
 
def edit_category_data(request, category_id, template_name="manage/category/data.html"):
    """Updates the category data.
    """
    category = Category.objects.get(pk=category_id)
 
    else:    
        try:
            parent = Category.objects.get(pk=category_id)
        except ObjectDoesNotExist:
            parent = None
            parent_category = None
        else:
            parent_category = Category.objects.get(pk=category_id)
    except ObjectDoesNotExist:
        pass

src/l/f/lfs-HEAD/utils/views.py   lfs(Download)
        parent_id = categories.get(row[3])
 
        category = Category.objects.get(pk=child_id)
        category.parent_id = parent_id
        category.save()
        category_id = categories.get(row[0])
        if category_id:
            category = Category.objects.get(pk=category_id)
            category.image.save(filename, cf)
            category.save()

src/l/f/lfs-HEAD/manage/views/categories/products.py   lfs(Download)
def manage_products(request, category_id, template_name="manage/category/products.html"):
    """
    """
    category = Category.objects.get(pk=category_id)
    inline = products_inline(request, category_id, True)
    update this part independent of others.
    """
    category = Category.objects.get(pk=category_id)
 
    products = category.get_products()
    this part independent of others.
    """
    category = Category.objects.get(pk=category_id)
 
    if request.REQUEST.get("keep-session"):
def add_products(request, category_id):
    """Adds products (passed via request body) to category with passed id.
    """
    category = Category.objects.get(pk=category_id)
 
def remove_products(request, category_id):
    """Removes product (passed via request body) from category with passed id.
    """
    category = Category.objects.get(pk=category_id)
 

src/d/j/django-lfs-0.7.7/lfs/manage/views/export.py   django-lfs(Download)
def edit_category(request, export_id, category_id):
    """Adds/Removes products of given category to given export.
    """
    export = Export.objects.get(pk=export_id)
    category = Category.objects.get(pk=category_id)
    """
    export = Export.objects.get(pk=export_id)
    category = Category.objects.get(pk=category_id)
    checked, klass = _get_category_state(export, category)
 
 
    try:
        category = Category.objects.get(pk=category_id)
    except Category.DoesNotExist:
        return HttpResponse("")

src/d/j/django-lfs-HEAD/lfs/manage/views/export.py   django-lfs(Download)
def edit_category(request, export_id, category_id):
    """Adds/Removes products of given category to given export.
    """
    export = Export.objects.get(pk=export_id)
    category = Category.objects.get(pk=category_id)
    """
    export = Export.objects.get(pk=export_id)
    category = Category.objects.get(pk=category_id)
    checked, klass = _get_category_state(export, category)
 
 
    try:
        category = Category.objects.get(pk=category_id)
    except Category.DoesNotExist:
        return HttpResponse("")

src/d/j/django-lfs-0.7.7/lfs/manage/manufacturers/views.py   django-lfs(Download)
def edit_category(request, manufacturer_id, category_id):
    """Adds/Removes products of given category to given manufacturer.
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
    category = Category.objects.get(pk=category_id)
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
    category = Category.objects.get(pk=category_id)
    checked, klass = _get_category_state(manufacturer, category)
 

src/d/j/django-lfs-0.7.7/lfs/manage/categories/products.py   django-lfs(Download)
def manage_products(request, category_id, template_name="manage/category/products.html"):
    """
    """
    category = Category.objects.get(pk=category_id)
    inline = products_inline(request, category_id, True)
    update this part independent of others.
    """
    category = Category.objects.get(pk=category_id)
 
    products = Product.objects.filter(categories=category)
    this part independent of others.
    """
    category = Category.objects.get(pk=category_id)
 
    if request.REQUEST.get("keep-session"):
def add_products(request, category_id):
    """Adds products (passed via request body) to category with passed id.
    """
    category = Category.objects.get(pk=category_id)
 
def remove_products(request, category_id):
    """Removes product (passed via request body) from category with passed id.
    """
    category = Category.objects.get(pk=category_id)
 

src/d/j/django-lfs-HEAD/lfs/manage/manufacturers/views.py   django-lfs(Download)
def edit_category(request, manufacturer_id, category_id):
    """Adds/Removes products of given category to given manufacturer.
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
    category = Category.objects.get(pk=category_id)
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
    category = Category.objects.get(pk=category_id)
    checked, klass = _get_category_state(manufacturer, category)
 

  1 | 2  Next