def get_product(prodid): product = db.session.query(Product).filter(Product.id==prodid).one() users = product.users other_users = [u.id for u in db.session.query(User).all() if product not in u.products] return render_template('users.html', product=prodid, users=format_user_info(users, prodid), other_users=other_users)
def get_product(prodid): product = db.session.query(Product).filter(Product.id == prodid).one() users = product.users other_users = [ u.id for u in db.session.query(User).all() if product not in u.products ] return render_template('users.html', product=prodid, users=format_user_info(users, prodid), other_users=other_users)
def get_users(): users = db.session.query(User).all() return render_template('users.html', users=format_user_info(users))
def get_users(): users= db.session.query(User).all() return render_template('users.html', users=format_user_info(users))