コード例 #1
0
ファイル: clothModel.py プロジェクト: dsn9/Fashion-Share
def getImagesByBrand(brand):
    return Image.query().filter(Image.brand == brand).fetch()
コード例 #2
0
ファイル: clothModel.py プロジェクト: dsn9/Fashion-Share
def getImagesByType(clothingType):
    return Image.query().filter(Image.clothingType == clothingType).fetch()
コード例 #3
0
ファイル: clothModel.py プロジェクト: dsn9/Fashion-Share
def getImagesByPriceRange(min, max):
    images = Image.query()
    imagesBelow = images.filter(Image.totalPrice <= max)
    imagesAboveBelow = imagesBelow.filter(Image.totalPrice >= min)
    return imagesAboveBelow.fetch()