mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-31 10:19:54 +03:00
PyCharm - WIP
This commit is contained in:
parent
ebe351d91c
commit
ddaf523cd5
|
@ -14,5 +14,6 @@
|
|||
"use_maildump": "n",
|
||||
"use_sentry": "n",
|
||||
"use_docker": "n",
|
||||
"use_pycharm": "n",
|
||||
"windows": "n"
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import shutil
|
|||
|
||||
project_directory = os.path.realpath(os.path.curdir)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
docker = '{{cookiecutter.use_docker}}' == 'y'
|
||||
|
||||
docker_files = [
|
||||
|
@ -23,3 +24,23 @@ if not docker:
|
|||
|
||||
for path in docker_dirs:
|
||||
shutil.rmtree(os.path.join(project_directory, path))
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
pycharm = '{{cookiecutter.use_pycharm}}' == 'y'
|
||||
|
||||
pycharm_files = [
|
||||
|
||||
]
|
||||
|
||||
pycharm_dirs = [
|
||||
'.idea/',
|
||||
]
|
||||
|
||||
if not pycharm:
|
||||
for path in pycharm_files:
|
||||
os.remove(os.path.join(project_directory, path))
|
||||
|
||||
for path in pycharm_dirs:
|
||||
shutil.rmtree(os.path.join(project_directory, path))
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
6
{{cookiecutter.repo_name}}/.gitignore
vendored
6
{{cookiecutter.repo_name}}/.gitignore
vendored
|
@ -37,8 +37,14 @@ nosetests.xml
|
|||
*.mo
|
||||
*.pot
|
||||
|
||||
{% if cookiecutter.use_pycharm == 'y' %}
|
||||
# Pycharm
|
||||
.idea
|
||||
!.idea/modules.xml
|
||||
!.idea/{{cookiecutter.repo_name}}.iml
|
||||
!.idea/runConfigurations/Docker.xml
|
||||
{% endif %}
|
||||
|
||||
|
||||
# Vim
|
||||
|
||||
|
|
8
{{cookiecutter.repo_name}}/.idea/modules.xml
Normal file
8
{{cookiecutter.repo_name}}/.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/{{ cookiecutter.repo_name }}.iml" filepath="$PROJECT_DIR$/.idea/{{ cookiecutter.repo_name }}.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,33 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Docker" type="Python.DjangoServer" factoryName="Django server" singleton="true">
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
<env name="DJANGO_SETTINGS_MODULE" value="config.settings.local" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="ssh://docker@localhost:2222/usr/local/bin/python" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<module name="{{ cookiecutter.repo_name }}" />
|
||||
<PathMappingSettings>
|
||||
<option name="pathMappings">
|
||||
<list>
|
||||
<mapping local-root="$PROJECT_DIR$" remote-root="/app" />
|
||||
</list>
|
||||
</option>
|
||||
</PathMappingSettings>
|
||||
<option name="launchJavascriptDebuger" value="false" />
|
||||
<option name="port" value="8000" />
|
||||
<option name="host" value="0.0.0.0" />
|
||||
<option name="additionalOptions" value="" />
|
||||
<option name="browserUrl" value="" />
|
||||
<option name="runTestServer" value="false" />
|
||||
<option name="runNoReload" value="false" />
|
||||
<option name="useCustomRunCommand" value="false" />
|
||||
<option name="customRunCommand" value="" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
14
{{cookiecutter.repo_name}}/.idea/webResources.xml
Normal file
14
{{cookiecutter.repo_name}}/.idea/webResources.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WebResourcesPaths">
|
||||
<contentEntries>
|
||||
<entry url="file://$PROJECT_DIR$">
|
||||
<entryData>
|
||||
<resourceRoots>
|
||||
<path value="file://$PROJECT_DIR$/{{ cookiecutter.repo_name }}/static" />
|
||||
</resourceRoots>
|
||||
</entryData>
|
||||
</entry>
|
||||
</contentEntries>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="django" name="Django">
|
||||
<configuration>
|
||||
<option name="rootFolder" value="$MODULE_DIR$" />
|
||||
<option name="settingsModule" value="config/settings/local.py" />
|
||||
<option name="manageScript" value="manage.py" />
|
||||
<option name="environment" value="<map/>" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="TemplatesService">
|
||||
<option name="TEMPLATE_CONFIGURATION" value="Django" />
|
||||
<option name="TEMPLATE_FOLDERS">
|
||||
<list>
|
||||
<option value="$MODULE_DIR$/{{ cookiecutter.repo_name }}/templates" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in New Issue
Block a user