Skip to content

Commit

Permalink
Merge pull request #77 from moranabadie/fix-typo-doc
Browse files Browse the repository at this point in the history
fix typo in doc (#76)
  • Loading branch information
millerdev authored Aug 24, 2023
2 parents 8a1a2d0 + 1064dcf commit 5c8c1e5
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 5c8c1e5

Please sign in to comment.