... = models . BooleanField ( default = False ) def __str__ ( self ): return " %s the restaurant" % self . place . name class Waiter ( models . Model ): restaurant = models . ForeignKey ( Restaurant , on_delete = models . CASCADE ) name = models . CharFie ... ld ( max_length = 50 ) def __str__ ( self ): return " %s the waiter at %s " % ( self . name , self . restaurant ) 以下は、Python API の機能を使って実行できる操作の例です。 2つの Place を作成 ... ne_to_one.Place': 1}) >>> Restaurant . objects . all () <QuerySet [<Restaurant: Demon Dogs the restaurant>]> Restaurant に Waiter を追加します: >>> w = r . waiter_set . create ( name = "Joe" ) >>> w <Waiter: Joe the waiter at Demon Dogs the restaurant> ... ... = models . BooleanField ( default = False ) def __str__ ( self ): return " %s the restaurant" % self . place . name class Waiter ( models . Model ): restaurant = models . ForeignKey ( Restaurant , on_delete = models . CASCADE ) name = models . CharFie ... ld ( max_length = 50 ) def __str__ ( self ): return " %s the waiter at %s " % ( self . name , self . restaurant ) 以下は、Python API の機能を使って実行できる操作の例です。 2つの Place を作成 ... ne_to_one.Place': 1}) >>> Restaurant . objects . all () <QuerySet [<Restaurant: Demon Dogs the restaurant>]> Restaurant に Waiter を追加します: >>> w = r . waiter_set . create ( name = "Joe" ) >>> w <Waiter: Joe the waiter at Demon Dogs the restaurant> ... 2026年10月08日