Rename publishable to approved, add profile option to approve by default.
[redakcja.git] / src / depot / management / commands / depot.py
index 6e64e24..7087816 100644 (file)
@@ -1,10 +1,10 @@
 from django.core.management.base import BaseCommand
 from django.core.management.base import BaseCommand
-from depot.models import ShopBookPublish
+from depot.models import SiteBookPublish
 
 
 class Command(BaseCommand):
     def handle(self, **options):
 
 
 class Command(BaseCommand):
     def handle(self, **options):
-        for p in ShopBookPublish.objects.filter(status=0).order_by('created_at'):
-            print(p.id, p.shop, p.book.slug, p.created_at)
+        for p in SiteBookPublish.objects.filter(status=0).order_by('created_at'):
+            print(p.id, p.site_book, p.created_at)
             p.publish()
 
             p.publish()