0

私は次のpeeweeモデルを持っています:

class Product(peewee.Model):
    key = peewee.IntegerField(unique=True)
    name = peewee.CharField(null=False)
    is_active = peewee.CharField(null=True)
    base_price = peewee.IntegerField(null=True)

「name」列に「foo」という単語を含むすべての製品を検索したいと思います。

  1. Product.get() で実行できますか?
  2. それを達成するための正しい構文はどれですか?

ありがとう、

4

1 に答える 1