fix typos in Python-style filters documentation
This commit is contained in:
committed by
GitHub
parent
c7f280d616
commit
f4b2116cb9
@ -156,13 +156,13 @@ Some samples:
|
|||||||
```python
|
```python
|
||||||
# sql: ( product.name = 'Test' AND product.rating >= 3.0 )
|
# sql: ( product.name = 'Test' AND product.rating >= 3.0 )
|
||||||
Product.objects.filter(
|
Product.objects.filter(
|
||||||
(Product.name == 'Test') & (Product.rating >=3.0)
|
(Product.name == 'Test') & (Product.rating >= 3.0)
|
||||||
).get()
|
).get()
|
||||||
|
|
||||||
# sql: ( product.name = 'Test' AND product.rating >= 3.0 )
|
# sql: ( product.name = 'Test' AND product.rating >= 3.0 )
|
||||||
# OR (categories.name IN ('Toys', 'Books'))
|
# OR (categories.name IN ('Toys', 'Books'))
|
||||||
Product.objects.filter(
|
Product.objects.filter(
|
||||||
((Product.name='Test') & (Product.rating >= 3.0)) |
|
((Product.name == 'Test') & (Product.rating >= 3.0)) |
|
||||||
(Product.categories.name << ['Toys', 'Books'])
|
(Product.categories.name << ['Toys', 'Books'])
|
||||||
).get()
|
).get()
|
||||||
```
|
```
|
||||||
@ -851,4 +851,4 @@ objects from other side of the relation.
|
|||||||
To read more about `QuerysetProxy` visit [querysetproxy][querysetproxy] section
|
To read more about `QuerysetProxy` visit [querysetproxy][querysetproxy] section
|
||||||
|
|
||||||
|
|
||||||
[querysetproxy]: ../relations/queryset-proxy.md
|
[querysetproxy]: ../relations/queryset-proxy.md
|
||||||
|
|||||||
Reference in New Issue
Block a user