6e64e2460ed2780ec44b53e3cbef309294d35f55
[redakcja.git] / src / depot / management / commands / depot.py
1 from django.core.management.base import BaseCommand
2 from depot.models import ShopBookPublish
3
4
5 class Command(BaseCommand):
6     def handle(self, **options):
7         for p in ShopBookPublish.objects.filter(status=0).order_by('created_at'):
8             print(p.id, p.shop, p.book.slug, p.created_at)
9             p.publish()
10