Added the Renderable mixin because DRY

This commit is contained in:
Daniel Quinn
2016-02-11 22:05:38 +00:00
parent ef1639208c
commit 7aadab23cc
5 changed files with 27 additions and 23 deletions

View File

@@ -8,8 +8,10 @@ from django.core.management.base import BaseCommand, CommandError
from documents.models import Document
from paperless.db import GnuPG
from ...mixins import Renderable
class Command(BaseCommand):
class Command(Renderable, BaseCommand):
help = """
Decrypt and rename all files in our collection into a given target
@@ -50,7 +52,3 @@ class Command(BaseCommand):
f.write(GnuPG.decrypted(document.source_file))
t = int(time.mktime(document.created.timetuple()))
os.utime(target, times=(t, t))
def _render(self, text, verbosity):
if self.verbosity >= verbosity:
print(text)