diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index f19f2d1d3..2f567092a 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -44,3 +44,17 @@ if not pycharm: shutil.rmtree(os.path.join(project_directory, path)) # ------------------------------------------------------------------------------ + + +import fileinput + +jdk_table_xml = os.path.join(project_directory, 'compose/pycharm/jdk.table.xml') +jdk_table_dst_dir = os.path.join(os.path.expanduser('~'), '.PyCharm40/config/options/') + +for line in fileinput.input(jdk_table_xml, inplace=True): + print line.replace('$PROJECT_DIR$', project_directory), + + +if not os.path.exists(jdk_table_dst_dir): + os.makedirs(jdk_table_dst_dir) + shutil.copy2(jdk_table_xml, jdk_table_dst_dir) diff --git a/{{cookiecutter.repo_name}}/.idea/runConfigurations/_edit_to_activate__Docker__createsuperuser.xml b/{{cookiecutter.repo_name}}/.idea/runConfigurations/Docker__createsuperuser.xml similarity index 77% rename from {{cookiecutter.repo_name}}/.idea/runConfigurations/_edit_to_activate__Docker__createsuperuser.xml rename to {{cookiecutter.repo_name}}/.idea/runConfigurations/Docker__createsuperuser.xml index 944e74ede..d7fbe4045 100644 --- a/{{cookiecutter.repo_name}}/.idea/runConfigurations/_edit_to_activate__Docker__createsuperuser.xml +++ b/{{cookiecutter.repo_name}}/.idea/runConfigurations/Docker__createsuperuser.xml @@ -1,17 +1,17 @@ - +