mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 09:24:52 +03:00
choose editor and configure devcontainer
This commit is contained in:
parent
b7942bb265
commit
b181eb1d81
|
@ -43,8 +43,9 @@ SUPPORTED_COMBINATIONS = [
|
||||||
{"open_source_license": "Not open source"},
|
{"open_source_license": "Not open source"},
|
||||||
{"windows": "y"},
|
{"windows": "y"},
|
||||||
{"windows": "n"},
|
{"windows": "n"},
|
||||||
{"use_pycharm": "y"},
|
{"editor": "None"},
|
||||||
{"use_pycharm": "n"},
|
{"editor": "PyCharm"},
|
||||||
|
{"editor": "VS Code"},
|
||||||
{"use_docker": "y"},
|
{"use_docker": "y"},
|
||||||
{"use_docker": "n"},
|
{"use_docker": "n"},
|
||||||
{"postgresql_version": "14"},
|
{"postgresql_version": "14"},
|
||||||
|
@ -312,15 +313,16 @@ def test_error_if_incompatible(cookies, context, invalid_context):
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
["use_pycharm", "pycharm_docs_exist"],
|
["editor", "pycharm_docs_exist"],
|
||||||
[
|
[
|
||||||
("n", False),
|
("None", False),
|
||||||
("y", True),
|
("PyCharm", True),
|
||||||
|
("VS Code", False),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist):
|
def test_pycharm_docs_removed(cookies, context, editor, pycharm_docs_exist):
|
||||||
"""."""
|
"""."""
|
||||||
context.update({"use_pycharm": use_pycharm})
|
context.update({"editor": editor})
|
||||||
result = cookies.bake(extra_context=context)
|
result = cookies.bake(extra_context=context)
|
||||||
|
|
||||||
with open(f"{result.project_path}/docs/index.rst") as f:
|
with open(f"{result.project_path}/docs/index.rst") as f:
|
||||||
|
|
2
{{cookiecutter.project_slug}}/.gitignore
vendored
2
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -165,7 +165,7 @@ typings/
|
||||||
.history/
|
.history/
|
||||||
|
|
||||||
|
|
||||||
{% if cookiecutter.use_pycharm == 'y' -%}
|
{% if cookiecutter.editor == 'PyCharm' -%}
|
||||||
# Provided default Pycharm Run/Debug Configurations should be tracked by git
|
# Provided default Pycharm Run/Debug Configurations should be tracked by git
|
||||||
# In case of local modifications made by Pycharm, use update-index command
|
# In case of local modifications made by Pycharm, use update-index command
|
||||||
# for each changed file, like this:
|
# for each changed file, like this:
|
||||||
|
|
|
@ -35,7 +35,7 @@ ENV BUILD_ENV ${BUILD_ENVIRONMENT}
|
||||||
|
|
||||||
WORKDIR ${APP_HOME}
|
WORKDIR ${APP_HOME}
|
||||||
|
|
||||||
{% if cookiecutter.docker == "y" %}
|
{% if cookiecutter.use_docker == "y" %}
|
||||||
# devcontainer dependencies and utils
|
# devcontainer dependencies and utils
|
||||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
sudo git bash-completion nano
|
sudo git bash-completion nano
|
||||||
|
|
|
@ -10,7 +10,7 @@ Welcome to {{ cookiecutter.project_name }}'s documentation!
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: Contents:
|
:caption: Contents:
|
||||||
|
|
||||||
howto{% if cookiecutter.use_pycharm == 'y' %}
|
howto{% if cookiecutter.editor == 'PyCharm' %}
|
||||||
pycharm/configuration{% endif %}
|
pycharm/configuration{% endif %}
|
||||||
users
|
users
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user