예제 #1
0
def home():

    products = Product.objects(order__lte=3)[:3]
    banners = Photo.objects(name__startswith='banner-')[:3].order_by("+name")

    return render_template('index.html', products=products, \
            banners=banners)
예제 #2
0
def home():

    products = Product.objects(order__lte=3)[:3]
    banners = Photo.objects(name__startswith='banner-')[:3].order_by("+name")

    return render_template('index.html', products=products, \
            banners=banners)
예제 #3
0
def product(iden):

    product = Product.objects(iden=iden)[0]

    return render_template('product.html', product=product)
예제 #4
0
def products():
    products = Product.objects()

    return render_template('products.html', products=products)
예제 #5
0
def product(iden):

    product = Product.objects(iden=iden)[0]

    return render_template('product.html', product=product)
예제 #6
0
def products():
    products = Product.objects()

    return render_template('products.html', products=products)