podjango: Temporarily filter out episodes prior to 2024

This commit is contained in:
Ben Sturmfels 2024-02-07 11:03:56 +11:00
parent 4a2ed6714a
commit 6ce976e63a
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -18,7 +18,6 @@
#
from datetime import datetime, timedelta
from django.conf import settings
from django.db import models
from django.urls import reverse
@ -39,6 +38,12 @@ class CastTag(models.Model):
return reverse('podjango:cast') + "?tag=%s" % self.slug
class CastManager(models.Manager):
def get_queryset(self):
# Temporarily filter out old FaiF episodes we've imported.
return super().get_queryset().filter(pub_date__year__gte=2024)
class Cast(models.Model):
"""Cast"""
@ -58,6 +63,8 @@ class Cast(models.Model):
date_created = models.DateTimeField(auto_now_add=True)
date_last_modified = models.DateTimeField(auto_now=True)
objects = CastManager()
class Meta:
db_table = 'casts_entries' # legacy
verbose_name_plural = 'casts'