Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
def get_users():
    users = db.session.query(User).all()
    return render_template('users.html', users=format_user_info(users))
Пример #4
0
def get_users():
    users= db.session.query(User).all()
    return render_template('users.html', users=format_user_info(users))