mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 01:14:53 +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"},
|
||||
{"windows": "y"},
|
||||
{"windows": "n"},
|
||||
{"use_pycharm": "y"},
|
||||
{"use_pycharm": "n"},
|
||||
{"editor": "None"},
|
||||
{"editor": "PyCharm"},
|
||||
{"editor": "VS Code"},
|
||||
{"use_docker": "y"},
|
||||
{"use_docker": "n"},
|
||||
{"postgresql_version": "14"},
|
||||
|
@ -312,15 +313,16 @@ def test_error_if_incompatible(cookies, context, invalid_context):
|
|||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
["use_pycharm", "pycharm_docs_exist"],
|
||||
["editor", "pycharm_docs_exist"],
|
||||
[
|
||||
("n", False),
|
||||
("y", True),
|
||||
("None", False),
|
||||
("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)
|
||||
|
||||
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/
|
||||
|
||||
|
||||
{% if cookiecutter.use_pycharm == 'y' -%}
|
||||
{% if cookiecutter.editor == 'PyCharm' -%}
|
||||
# Provided default Pycharm Run/Debug Configurations should be tracked by git
|
||||
# In case of local modifications made by Pycharm, use update-index command
|
||||
# for each changed file, like this:
|
||||
|
|
|
@ -35,7 +35,7 @@ ENV BUILD_ENV ${BUILD_ENVIRONMENT}
|
|||
|
||||
WORKDIR ${APP_HOME}
|
||||
|
||||
{% if cookiecutter.docker == "y" %}
|
||||
{% if cookiecutter.use_docker == "y" %}
|
||||
# devcontainer dependencies and utils
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
sudo git bash-completion nano
|
||||
|
|
|
@ -10,7 +10,7 @@ Welcome to {{ cookiecutter.project_name }}'s documentation!
|
|||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
howto{% if cookiecutter.use_pycharm == 'y' %}
|
||||
howto{% if cookiecutter.editor == 'PyCharm' %}
|
||||
pycharm/configuration{% endif %}
|
||||
users
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user