paperless-ngx/src/manage.py

20 lines
650 B
Python
Raw Normal View History

2015-12-20 19:23:33 +00:00
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "paperless.settings")
2016-01-01 16:13:59 +00:00
from django.conf import settings
2015-12-20 19:23:33 +00:00
from django.core.management import execute_from_command_line
2016-01-01 16:13:59 +00:00
# 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: ")
2015-12-20 19:23:33 +00:00
execute_from_command_line(sys.argv)