Source code for superdjango.db.revised.managers

# Imports

from django.db import models

# Exports

__all__ = (
    "RevisionManager",
)

# Managers


[docs]class RevisionManager(models.Manager): """Automatically filters for revised records."""
[docs] def get_queryset(self): """Add filter to get only the latest records, e.g. those that are not a previous revision.""" qs = super().get_queryset() return qs.filter(is_previous_revision=False)