def products(): products = product_repository.select_all() manufacturers = manufacturer_repository.select_all() categories = get_unique_categories_from_products(products) return render_template("products/index.html", products=products, manufacturers=manufacturers, categories=categories)
def create_stock_from_products(): all_products = product_repository.select_all() choices = range(0,30) for product in all_products: item_to_stock = Stock(product) random_number = random.choice(choices) item_to_stock.modify_count(random_number) stock_repository.save(item_to_stock)
def home(): products = product_repository.select_all() return render_template('index.html', products=products)
def show_quick_stock(): products = product_repository.select_all() manufacturers = manufacturer_repository.select_all() return render_template("products/quick_stock.html", products=products, manufacturers=manufacturers)
def product(): products = product_repository.select_all() return render_template("products/index.html", products=products)
def products(): products = product_repository.select_all() # NEW return render_template("products/index.html", all_products=products)
def products(): products = product_repository.select_all() return render_template("products/index.html", inventory=products, title="Inn-Ventory - Full Inventory")
def new_record_label(): products = product_repository.select_all() record_labels = record_label_repository.select_all() return render_template("record_labels/new.html", title = "Add Record Label", products=products, record_labels=record_labels)
def new_product(): products = product_repository.select_all() record_labels = record_label_repository.select_all() return render_template("products/new.html", products=products, record_labels=record_labels)
def edit_product(id): manufacturers = manufacturer_repository.select(id) products = product_repository.select_all() return render_template("manufacturers/edit.html", products=products, manufacturer=manufacturers)
def products_editing_view(): products = product_repository.select_all() return render_template("editing/prodedit.html", products=products)
def products_extended_view(): products = product_repository.select_all() return render_template("fullview/index.html", products=products)