per page, with , order by , clip by
Results of 1 - 1 of about 1 for intelligent (0.001 sec.)
多対多 (many-to-many) 関係 9414
多対多 (many-to-many) 関係 多対多の関係を定義するには、 ManyToManyField を使用します。 この例では、一つの Article は複数の Publication オブジェクトに掲載することができ、一つの Publication は複数の Article オブジェクトを持ちます: from django ... . all () <QuerySet []> 多対多のリレーションシップの「反対側の」端を経由した追加: >>> a4 = Article ( headline = "NASA finds intelligent life on Earth" ) >>> a4 . save () >>> p2 . article_set . add ( a4 ) >>> p2 . article_set . all () <QuerySet [<Article: NAS ... A finds intelligent life on Earth>]> >>> a4 . publications . all () <QuerySet [<Publication: Science News>]> キーワードを使った反対側の端からの ... set . create ( headline = "Oxygen-free diet works wonders" ) >>> p2 . article_set . all () <QuerySet [<Article: NASA finds intelligent life on Earth>, <Article: Oxygen-free diet works wonders>]> >>> a5 = p2 . article_set . all ()[ 1 ] >>> a5 . publications ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_many.html
PREV 1 NEXT