Skip to content

Public views do not filter posts by date_published_end (Expired posts are visible) #67

@veliluukkonen

Description

@veliluukkonen

I noticed that the public list views (PostListView, CategoryListView, etc.) display posts that have passed their expiration date (date_published_end).

Looking at views.py, the BaseConfigListViewMixin.get_queryset method filters by language and app config, but it ignores the publication window dates (date_published and date_published_end) for non-staff users.

Expected behavior: Expired posts (where date_published_end is in the past) should not be visible to public users / unauthenticated visitors.

Suggested fix in views.py: Update BaseConfigListViewMixin.get_queryset to include a check for publication dates when the user is not staff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions