def apps_detail(app_id): app = models.apps_detail(app_id) if not app: return abort(404) products = models.products(app_id) return render_template('apps/apps_detail.html', app = app, products = products)
def products(app_id): products = models.products(app_id) return render_template('apps/products.html', app_id = app_id, products = products)
def addProduct(pro): from app.models import products product= products(name=pro[2],brand=pro[1],price=pro[4],category=pro[3],description=pro[5],image=pro[0]) product.save() print "added ",pro[2],pro[1],pro[3] return