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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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")
Ejemplo n.º 8
0
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)
Ejemplo n.º 9
0
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)
Ejemplo n.º 11
0
def products_editing_view():
    products = product_repository.select_all()
    return render_template("editing/prodedit.html", products=products)
Ejemplo n.º 12
0
def products_extended_view():
    products = product_repository.select_all()

    return render_template("fullview/index.html", products=products)