78c016ba8df0eeb15ad106e9259b01bbe1f8d0d6
1 from django
.core
.management
.base
import BaseCommand
2 from optparse
import make_option
3 from mygpo
.search
.models
import SearchEntry
4 from mygpo
.api
.models
import ToplistEntry
5 from mygpo
.search
.util
import podcast_entry
, podcast_group_entry
7 class Command(BaseCommand
):
9 def handle(self
, *args
, **options
):
11 SearchEntry
.objects
.all().delete()
13 toplist
= ToplistEntry
.objects
.all()
17 entry
= podcast_group_entry(e
.podcast_group
, e
.subscriptions
)
20 entry
= podcast_entry(e
.podcast
, e
.subscriptions
)
22 if entry
and entry
.text
: