Recursively yield this Q object and all subexpressions, in depth-first order.
(self)
| 154 | return clone |
| 155 | |
| 156 | def flatten(self): |
| 157 | """ |
| 158 | Recursively yield this Q object and all subexpressions, in depth-first |
| 159 | order. |
| 160 | """ |
| 161 | yield self |
| 162 | for child in self.children: |
| 163 | if isinstance(child, tuple): |
| 164 | # Use the lookup. |
| 165 | child = child[1] |
| 166 | if hasattr(child, "flatten"): |
| 167 | yield from child.flatten() |
| 168 | else: |
| 169 | yield child |
| 170 | |
| 171 | def check(self, against, using=DEFAULT_DB_ALIAS): |
| 172 | """ |
no outgoing calls