sideshow.web.views.products

Views for Products

class sideshow.web.views.products.LocalProductView(request, context=None)[source]

Master view for LocalProduct; route prefix is local_products.

Notable URLs provided by this class:

  • /local/products/

  • /local/products/new

  • /local/products/XXX

  • /local/products/XXX/edit

  • /local/products/XXX/delete

make_new_order_batches_grid(product)[source]

Make and return the grid for the New Order Batches field.

make_orders_grid(product)[source]

Make and return the grid for the Orders field.

model_class

alias of LocalProduct

class sideshow.web.views.products.PendingProductView(request, context=None)[source]

Master view for PendingProduct; route prefix is pending_products.

Notable URLs provided by this class:

  • /pending/products/

  • /pending/products/new

  • /pending/products/XXX

  • /pending/products/XXX/edit

  • /pending/products/XXX/delete

ignore()[source]

View to “ignore” a pending product so the user is no longer prompted to resolve it.

This view requires POST; it merely sets the product status to “ignored”.

See also resolve().

make_new_order_batches_grid(product)[source]

Make and return the grid for the New Order Batches field.

make_orders_grid(product)[source]

Make and return the grid for the Orders field.

model_class

alias of PendingProduct

resolve()[source]

View to “resolve” a pending product with the real external product.

This view requires POST, with product_id referencing the desired external product.

It will call get_product_info_external() to fetch product info, then with that it calls resolve_pending_product() to update related order items etc.

See also ignore().