From b0651e9336adcddedfcb2c9fd9025c7d565c685f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 4 Jul 2013 09:30:28 +0200 Subject: [PATCH 1/1] Configurable path to the localsettings.py file --- fnpdjango/deploy/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fnpdjango/deploy/__init__.py b/fnpdjango/deploy/__init__.py index f0f4837..6edaebc 100644 --- a/fnpdjango/deploy/__init__.py +++ b/fnpdjango/deploy/__init__.py @@ -13,6 +13,9 @@ Then set up some env properties: django_root_path (optional): path to the directory containing django project, relative to the root of the repository (defaults to '.') + localsettings_dst_path (optional): path indicating + where to copy the localsettings file, relative + to django_root_path (defaults to project_name/localsettings.py) """ from os.path import abspath, dirname, exists, join from django.utils.crypto import get_random_string @@ -214,7 +217,7 @@ def copy_localsettings(): require('app_path', 'project_name') with settings(warn_only=True): - copy_to = join(get_django_root_path(env['release']), env['project_name']) + copy_to = join(get_django_root_path(env['release']), env.get('localsettings_dst_path', env['project_name'])) run('cp %(app_path)s/localsettings.py ' % env + copy_to) def symlink_current_release(): -- 2.20.1