From a14f8cb980f1745b8a3ba88bdd9ff040d20ddedf Mon Sep 17 00:00:00 2001 From: pwhipp Date: Thu, 10 Jul 2014 15:14:53 +1000 Subject: [PATCH] Tidied common settings --- mayan/settings/includes/common.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mayan/settings/includes/common.py b/mayan/settings/includes/common.py index a0f1fe5945..ed70d069e8 100644 --- a/mayan/settings/includes/common.py +++ b/mayan/settings/includes/common.py @@ -1,6 +1,4 @@ """ -Django settings for testproject project. - For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ @@ -18,9 +16,12 @@ ugettext = lambda s: s import os import sys -BASE_DIR = '/'.join(os.path.abspath(os.path.dirname(__file__)).split('/')[0:-4]) # up from mayan/settings/include +BASE_DIR = '/'.join(os.path.abspath(os.path.dirname(__file__)).split('/')[0:-3]) # up from mayan/settings/include SITE_ROOT = BASE_DIR # for compatibility -sys.path.append(os.path.join(BASE_DIR, 'mayan/apps')) + +_apps_path = os.path.join(BASE_DIR, 'mayan/apps') +if _apps_path not in sys.path: + sys.path.append(_apps_path) STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static_collected/')