From 69466e712bd5dc75f56020577e694d75d4a4537f Mon Sep 17 00:00:00 2001
From: Jeff Bogatay <jbogatay@imsi-pm.com>
Date: Tue, 23 Aug 2016 13:28:08 -0400
Subject: [PATCH] Prettify code, change ENV variable name

---
 paperless.conf.example    | 2 +-
 src/paperless/settings.py | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/paperless.conf.example b/paperless.conf.example
index 3ba8c6693..6b2a102ab 100644
--- a/paperless.conf.example
+++ b/paperless.conf.example
@@ -83,5 +83,5 @@ PAPERLESS_SHARED_SECRET=""
 
 # You can specify where you want the SQLite database to be stored instead of 
 # the default location
-#PAPERLESS_DBLOCATION=/path/to/database/file
+#PAPERLESS_DBDIR=/path/to/database/file
 
diff --git a/src/paperless/settings.py b/src/paperless/settings.py
index dcb87a248..de25313c6 100644
--- a/src/paperless/settings.py
+++ b/src/paperless/settings.py
@@ -95,7 +95,13 @@ WSGI_APPLICATION = 'paperless.wsgi.application'
 DATABASES = {
     "default": {
         "ENGINE": "django.db.backends.sqlite3",
-        "NAME": os.path.join(os.getenv("PAPERLESS_DBLOCATION",os.path.join(BASE_DIR, "..", "data")), "db.sqlite3")
+        "NAME": os.path.join(
+                    os.getenv(
+                        "PAPERLESS_DBDIR",
+                        os.path.join(BASE_DIR, "..", "data")
+                    ),
+                    "db.sqlite3"
+                )
     }
 }