This commit is contained in:
Christopher Neugebauer 2016-04-02 13:29:53 +11:00
parent 77b6c87973
commit 2e0144effe
3 changed files with 8 additions and 5 deletions

View file

@ -2,9 +2,11 @@ from .product import ProductController
from registrasion import models as rego from registrasion import models as rego
class AllProducts(object): class AllProducts(object):
pass pass
class CategoryController(object): class CategoryController(object):
@classmethod @classmethod

View file

@ -293,10 +293,11 @@ class BasicCartTests(RegistrationCartTestCase):
def __available_products_test(self, item, quantity): def __available_products_test(self, item, quantity):
self.set_limits() self.set_limits()
get_prods = lambda: ProductController.available_products( def get_prods():
self.USER_1, return ProductController.available_products(
products=[self.PROD_2, self.PROD_3, self.PROD_4], self.USER_1,
) products=[self.PROD_2, self.PROD_3, self.PROD_4],
)
current_cart = CartController.for_user(self.USER_1) current_cart = CartController.for_user(self.USER_1)
prods = get_prods() prods = get_prods()

View file

@ -243,7 +243,7 @@ def product_category(request, category_id):
if not products: if not products:
messages.warning( messages.warning(
request, request,
"There are no products available from category: "+ category.name, "There are no products available from category: " + category.name,
) )
return redirect("dashboard") return redirect("dashboard")