mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 00:35:30 +01:00
added progress bar to the document renamer.
This commit is contained in:
parent
46c0ab943f
commit
b3daf0efc3
1 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
import logging
|
||||||
|
|
||||||
|
import tqdm
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
|
|
@ -18,6 +21,8 @@ class Command(Renderable, BaseCommand):
|
||||||
|
|
||||||
self.verbosity = options["verbosity"]
|
self.verbosity = options["verbosity"]
|
||||||
|
|
||||||
for document in Document.objects.all():
|
logging.getLogger().handlers[0].level = logging.ERROR
|
||||||
|
|
||||||
|
for document in tqdm.tqdm(Document.objects.all()):
|
||||||
# Saving the document again will generate a new filename and rename
|
# Saving the document again will generate a new filename and rename
|
||||||
document.save()
|
document.save()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue