From a1a3f7c40b208737427dfed14c6a6e9e9e4a44c0 Mon Sep 17 00:00:00 2001 From: moran abadie Date: Wed, 23 Aug 2023 17:33:28 +0200 Subject: [PATCH] fix typo in doc (#76) --- docs/index.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/index.md b/docs/index.md index 12c5bf9..2f2cb53 100644 --- a/docs/index.md +++ b/docs/index.md @@ -346,12 +346,13 @@ 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() + large = LargeOrdersQuerySet.as_manager() ``` Custom `CTEQuerySet`s can also be used with custom `CTEManager`s. @@ -362,7 +363,7 @@ class CustomManager(CTEManager): class Order(Model): - large = CustomManager.from_queryset(LargeOrdersQueySet)() + large = CustomManager.from_queryset(LargeOrdersQuerySet)() objects = CustomManager() ```