Custom Page Manager documentation fix

Thanks to @nimasmi for reporting!
pull/3101/merge
Matt Westcott 2016-10-25 11:48:02 +01:00
rodzic bb37dec700
commit a326cd8559
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -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()