From a326cd855919e9e4092b1383b611bafc840019a5 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Tue, 25 Oct 2016 11:48:02 +0100 Subject: [PATCH] Custom Page Manager documentation fix Thanks to @nimasmi for reporting! --- docs/topics/pages.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/topics/pages.rst b/docs/topics/pages.rst index eefe5cd48..e798b1184 100644 --- a/docs/topics/pages.rst +++ b/docs/topics/pages.rst @@ -473,7 +473,9 @@ Alternately, if you only need to add extra ``QuerySet`` methods, you can inherit today = timezone.localtime(timezone.now()).date() return self.filter(start_date__gte=today) + EventPageManager = PageManager.from_queryset(EventPageQuerySet) + class EventPage(Page): start_date = models.DateField() - objects = PageManager.from_queryset(EventPageQuerySet) + objects = EventPageManager()