Skip to content

Commit

Permalink
fix typo in doc (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
moranabadie committed Aug 23, 2023
1 parent 8a1a2d0 commit 1064dcf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,14 @@ Custom `QuerySet`s that will be used in CTE queries should be derived from
`CTEQuerySet`.

```py
class LargeOrdersQueySet(CTEQuerySet):
return self.filter(amount__gt=100)
class LargeOrdersQuerySet(CTEQuerySet):
def big_amounts(self):
return self.filter(amount__gt=100)


class Order(Model):
large = LargeOrdersQueySet.as_manager()
amount = models.IntegerField()
large = LargeOrdersQuerySet.as_manager()
```

Custom `CTEQuerySet`s can also be used with custom `CTEManager`s.
Expand All @@ -362,7 +364,7 @@ class CustomManager(CTEManager):


class Order(Model):
large = CustomManager.from_queryset(LargeOrdersQueySet)()
large = CustomManager.from_queryset(LargeOrdersQuerySet)()
objects = CustomManager()
```

Expand Down

0 comments on commit 1064dcf

Please sign in to comment.