From bf2b0b853071cc449a047f4687f2322be6b2b4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Ar=C4=B1c=C4=B1?= Date: Tue, 24 Aug 2010 22:01:44 +0000 Subject: [PATCH] Added auto-defining capabilites to some directory structure spesific variables/settings. --- DJAGEN/branches/mustafa_branch/djagen/gezegen/planet.py | 4 +++- DJAGEN/branches/mustafa_branch/djagen/settings.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DJAGEN/branches/mustafa_branch/djagen/gezegen/planet.py b/DJAGEN/branches/mustafa_branch/djagen/gezegen/planet.py index f1fcf7c..fffacf4 100755 --- a/DJAGEN/branches/mustafa_branch/djagen/gezegen/planet.py +++ b/DJAGEN/branches/mustafa_branch/djagen/gezegen/planet.py @@ -44,7 +44,9 @@ TEMPLATE_FILES = "examples/basic/planet.html.tmpl" import sys import os # In order to reduce integration issues, this path gets defined automatically. -sys.path.append("/home/cad/Workspace/djagen_ws/gezegen/DJAGEN/branches/mustafa_branch/") +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),'../..'))) + + os.environ['DJANGO_SETTINGS_MODULE'] = 'djagen.settings' from djagen.collector.models import * diff --git a/DJAGEN/branches/mustafa_branch/djagen/settings.py b/DJAGEN/branches/mustafa_branch/djagen/settings.py index 3dd7c72..a600f6f 100755 --- a/DJAGEN/branches/mustafa_branch/djagen/settings.py +++ b/DJAGEN/branches/mustafa_branch/djagen/settings.py @@ -1,7 +1,8 @@ # Django settings for djagen project. import os -BASEPATH = '/home/cad/Workspace/djagen_ws/gezegen/DJAGEN/branches/mustafa_branch/djagen' +#This BASEPATH gets defined automatically. +BASEPATH = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG