]> git.ozlabs.org Git - patchwork/commitdiff
settings.py: use python to find ROOT_DIR
authorAndreas Bießmann <andreas@biessmann.de>
Tue, 19 Nov 2013 14:44:00 +0000 (15:44 +0100)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 24 Jul 2014 09:14:21 +0000 (17:14 +0800)
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/settings.py
docs/INSTALL

index 4bde26b66a5274b8bd3b5a88f8d4650a6dbbdd04..3579ab7b06b116d510324b670870b493e0b38622 100644 (file)
@@ -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.
index 760607f0b9f50b07684753ac3927c36ea5609a69..5716ed231b59ac36dc6e4e3f68ad17e3011cb67e 100644 (file)
@@ -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: