Merge pull request #289 from pawamoy/patch-2

fix typos in Python-style filters documentation
This commit is contained in:
collerek
2021-07-27 16:40:17 +02:00
committed by GitHub

View File

@ -156,13 +156,13 @@ Some samples:
```python
# sql: ( product.name = 'Test' AND product.rating >= 3.0 )
Product.objects.filter(
(Product.name == 'Test') & (Product.rating >=3.0)
(Product.name == 'Test') & (Product.rating >= 3.0)
).get()
# sql: ( product.name = 'Test' AND product.rating >= 3.0 )
# OR (categories.name IN ('Toys', 'Books'))
Product.objects.filter(
((Product.name='Test') & (Product.rating >= 3.0)) |
((Product.name == 'Test') & (Product.rating >= 3.0)) |
(Product.categories.name << ['Toys', 'Books'])
).get()
```