changed django configuration for settings that it inserts the relative path in layout that has this fabric implementation

This commit is contained in:
ronny abraham 2023-07-07 15:11:40 +03:00
parent 0956487932
commit 1267e91976
3 changed files with 15 additions and 6 deletions

View file

@ -463,6 +463,7 @@ def generate_scripts(template_name, make_copy=False):
context['project_name'] = project_name
context['project_branch'] = project_branch
context['secret_key'] = secret_key
context['paths_tools_fabric'] = configuration.paths.tools.fabric.relative
copy_path = "{project_path}/{project_name}".format(
project_path=project_path,

View file

@ -350,9 +350,17 @@ def get_config(branchname):
# tools used in development
dataobject.paths.addbranch('tools')
dataobject.paths.tools.fabric = os.path.join(
dataobject.paths.tools.addbranch('fabric')
#
# create both the relative and full paths for the fabric implementation
dataobject.paths.tools.fabric.relative = \
layout['paths']['tools']['fabric']['root']
dataobject.paths.tools.fabric.full = os.path.join(
dataobject.paths.project.root,
layout['paths']['tools']['fabric']['root'])
dataobject.paths.tools.fabric.relative)
dataobject.addbranch('tools')
dataobject.tools.addbranch('fabric')
@ -360,17 +368,17 @@ def get_config(branchname):
dataobject.tools.fabric.templates.conf = os.path.join(
dataobject.paths.project.root,
dataobject.paths.tools.fabric,
dataobject.paths.tools.fabric.full,
layout['paths']['tools']['fabric']['templates']['conf'])
dataobject.tools.fabric.templates.meta = os.path.join(
dataobject.paths.project.root,
dataobject.paths.tools.fabric,
dataobject.paths.tools.fabric.full,
layout['paths']['tools']['fabric']['templates']['meta'])
dataobject.tools.fabric.templates.readmes = os.path.join(
dataobject.paths.project.root,
dataobject.paths.tools.fabric,
dataobject.paths.tools.fabric.full,
layout['paths']['tools']['fabric']['templates']['readmes'])
#

View file

@ -23,7 +23,7 @@ PROJECT_ROOT = os.path.abspath(os.path.join(BASE_DIR, os.pardir))
# infomration for the settings file
sys.path.insert(0, os.path.join(
PROJECT_ROOT, 'usr', 'bin', 'fabric'))
PROJECT_ROOT, '{{ paths_tools_fabric }}'))
#
# add an "apps" directory to this project, which is where all the apps