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
6 class Command(BaseCommand
):
8 def handle(self
, *args
, **options
):
10 SearchEntry
.objects
.all().delete()
12 toplist
= ToplistEntry
.objects
.all()
16 entry
= SearchEntry
.from_object(e
.podcast_group
, e
.subscriptions
)
19 entry
= SearchEntry
.from_object(e
.podcast
, e
.subscriptions
)
21 if entry
and entry
.text
: