From patchwork Tue Nov 19 14:44:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 292585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 99DBD2C036E for ; Wed, 20 Nov 2013 09:05:39 +1100 (EST) Received: from cyclops.biessmann.org (cyclops.biessmann.org [134.0.25.77]) by ozlabs.org (Postfix) with ESMTP id D623F2C0127 for ; Wed, 20 Nov 2013 01:50:46 +1100 (EST) Received: from localhost (er.biessmann.org [80.81.14.92]) by cyclops.biessmann.org (Postfix) with ESMTPSA id 5AAEFB6B66; Tue, 19 Nov 2013 15:42:17 +0100 (CET) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: patchwork@lists.ozlabs.org Subject: [PATCH 2/4] settings.py: use python to find ROOT_DIR Date: Tue, 19 Nov 2013 15:44:00 +0100 Message-Id: <1384872242-18238-2-git-send-email-andreas@biessmann.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1384872242-18238-1-git-send-email-andreas@biessmann.de> References: <1384872242-18238-1-git-send-email-andreas@biessmann.de> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 20 Nov 2013 09:05:20 +1100 Cc: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: Andreas Bießmann --- apps/settings.py | 4 +--- docs/INSTALL | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/settings.py b/apps/settings.py index 43a37d8..4e09a29 100644 --- a/apps/settings.py +++ b/apps/settings.py @@ -68,9 +68,7 @@ ROOT_URLCONF = 'apps.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 e5f88e8..b7924d8 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: