X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/4a6513cd9ed9d66351b8973d3455204aad684fb5..db255ed9d242c56b010061fbdef8de9b696869d4:/src/depot/management/commands/depot.py diff --git a/src/depot/management/commands/depot.py b/src/depot/management/commands/depot.py new file mode 100644 index 00000000..4b8b99af --- /dev/null +++ b/src/depot/management/commands/depot.py @@ -0,0 +1,10 @@ +from django.core.management.base import BaseCommand +from depot.models import LegimiBookPublish + + +class Command(BaseCommand): + def handle(self, **options): + for p in LegimiBookPublish.objects.filter(status=0).order_by('created_at'): + print(p, p.book.slug, p.created_at) + p.publish() +