nephila / djangocms-rest-view

A REST interface to django CMS
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

fix page still shows up after unpublish #6

Open fvgoto opened 7 years ago

fvgoto commented 7 years ago

A page being public does not seem to be exactly the same as a page being published.

See how it is done in cms/models/pagemodel.py:

    def get_object_queryset(self):
        qs = self.__class__.objects
        return (self.publisher_is_draft and qs.drafts() or qs.public().published())

When not draft, it takes .public().published().