remove unnecessary imports
[mygpo.git] / mygpo / data / management / commands / historic-data.py
blobc5d3003833017277c2453cecf2b8bd0ad409b7dc
1 from django.core.management.base import BaseCommand
2 from mygpo.data.historic import calc_podcast
3 from mygpo.api.models import Podcast
5 class Command(BaseCommand):
6 def handle(self, *args, **options):
7 max = Podcast.objects.count()
8 n=0
10 for p in Podcast.objects.all().order_by('id').iterator():
11 n+=1
12 print '%d / %d: %d - %s' % (n, max, p.id, p)
13 calc_podcast(p)