aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas@biessmann.de>2013-11-19 15:44:00 +0100
committerJeremy Kerr <jk@ozlabs.org>2014-07-24 17:14:21 +0800
commitb49c71899e27592eee03b3caefbce26a411c6099 (patch)
tree50277b5f7469b64912237c3180a4a8e9b6f9429b
parent3fd68370c79cf1567772c7da3c3c4b2b92046d7d (diff)
downloadpatchwork-b49c71899e27592eee03b3caefbce26a411c6099.tar
patchwork-b49c71899e27592eee03b3caefbce26a411c6099.tar.gz
settings.py: use python to find ROOT_DIR
Signed-off-by: Andreas Bießmann <andreas@biessmann.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r--apps/settings.py4
-rw-r--r--docs/INSTALL7
2 files changed, 1 insertions, 10 deletions
diff --git a/apps/settings.py b/apps/settings.py
index 4bde26b..3579ab7 100644
--- a/apps/settings.py
+++ b/apps/settings.py
@@ -68,9 +68,7 @@ ROOT_URLCONF = 'urls'
LOGIN_URL = '/user/login/'
LOGIN_REDIRECT_URL = '/user/'
-# If you change the ROOT_DIR setting in your local_settings.py, you'll need to
-# re-define the variables that use this (MEDIA_ROOT and TEMPLATE_DIRS) too.
-ROOT_DIR = '/srv/patchwork'
+ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
diff --git a/docs/INSTALL b/docs/INSTALL
index 760607f..5716ed2 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -113,13 +113,6 @@ in brackets):
chars = string.letters + string.digits + string.punctuation
print repr("".join([random.choice(chars) for i in range(0,50)]))
- If you have patchwork installed in somewhere other than /srv/patchwork,
- you'll also need to define:
-
- ROOT_DIR
- MEDIA_ROOT
- TEMPLATE_DIRS
-
If you wish to enable the XML-RPC interface, add the following to
your local_settings.py file: