Added GPG encryption for the PDFs

This commit is contained in:
Daniel Quinn
2016-01-01 16:13:59 +00:00
parent 6956376d71
commit f72c515742
8 changed files with 106 additions and 50 deletions

View File

@@ -5,6 +5,15 @@ import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "paperless.settings")
from django.conf import settings
from django.core.management import execute_from_command_line
# The runserver and consumer need to have access to the passphrase, so it
# must be entered at start time to keep it safe.
if "runserver" in sys.argv or "consume" in sys.argv:
settings.PASSPHRASE = "asdf"
if not settings.DEBUG:
settings.PASSPHRASE = input(
"Production environment. Input passphrase: ")
execute_from_command_line(sys.argv)