Did I find the right examples for you? yes no

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

src/d/j/django-lfs-HEAD/lfs/manage/manufacturers/views.py   django-lfs(Download)
def manage_manufacturer(request, manufacturer_id, template_name="manage/manufacturers/manufacturer.html"):
    """The main view to display manufacturers.
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
 
def manufacturer_data_inline(request, manufacturer_id,
                             template_name="manage/manufacturers/manufacturer_data_inline.html"):
    """Displays the data form of the current manufacturer.
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
def manufacturer_inline(request, manufacturer_id, category_id,
    template_name="manage/manufacturers/manufacturer_inline.html"):
    """Returns categories and products for given manufacturer id and category id.
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
def delete_manufacturer(request, manufacturer_id):
    """Deletes Manufacturer with passed manufacturer id.
    """
    try:
        manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
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)

src/d/j/django-lfs-0.7.7/lfs/manage/manufacturers/views.py   django-lfs(Download)
def manage_manufacturer(request, manufacturer_id, template_name="manage/manufacturers/manufacturer.html"):
    """The main view to display manufacturers.
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
 
def manufacturer_inline(request, manufacturer_id, category_id,
    template_name="manage/manufacturers/manufacturer_inline.html"):
    """Returns categories and products for given manufacturer id and category id.
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
def delete_manufacturer(request, manufacturer_id):
    """Deletes Manufacturer with passed manufacturer id.
    """
    try:
        manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
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)
def edit_product(request, manufacturer_id, product_id):
    """Adds/Removes given product to given manufacturer.
    """
    manufacturer = Manufacturer.objects.get(pk=manufacturer_id)
    product = Product.objects.get(pk=product_id)

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

src/d/j/django-lfs-HEAD/lfs/manufacturer/tests.py   django-lfs(Download)
                                          'short_description': 'short', 'description': 'description'})
        self.assertEqual(response.status_code, 200)
        updated_man = Manufacturer.objects.get(pk=self.m1.pk)
        self.assertEqual(updated_man.short_description, u'short')
        self.assertEqual(updated_man.description, u'description')