ãã¼ã¿ãã¼ã¹ãããA OR Bãã£ã¦ããæ¡ä»¶ã§çµãè¾¼ãã§ãã¼ã¿ãåå¾ããã®ã£ã¦ãDjango ã§ã¯ã©ããããã ããããA AND Bããªã filter ã exclude ã§ãããã ãã©â¦ã å°ã£ãã¨ã㯠Django ã®å ¬å¼ããã¥ã¡ã³ããè¦ãã¹ãï¼ã£ã¦ãã¨ã§èª¿ã¹ã¦ã¿ãããã¡ããã¨æ¸ãã¦ããã¾ããã ã¯ã¨ãªãçæãã â Django v1.0 documentation Q ãªãã¸ã§ã¯ãã使ãã°ããã®ãã ä¾ãã°ãuser1 ã¾ã㯠user2 ã®æ稿ãåå¾ãããã ã¨ãQ ãªãã¸ã§ã¯ãã使ã£ã¦ posts = Post.object.filter(Q(author=user1) | Q(author=user2)) ã¨æ¸ãã¾ãã OR 㨠AND ãçµã¿åãããããuser1 ã¾ã㯠user2 ã®æ稿ã§ä¸æ¸ããããªããã®ãåå¾ãããã®å ´å posts = Post.object.fi
{{#tags}}- {{label}}
{{/tags}}