Skip to content

Allow boolean config variables #126

@mgaitan

Description

@mgaitan

cookiecutter.json allows a key-value configuration, where value is a string. I would like to ask for a boolean (yes/no) variable to condition a block like this

    {% if use_that_magic %}
         ....
    {% endif %}

The easiest way should be autodetect the variable type from the default value. For example

{ "full_name": "Martín Gaitán",
  "use_that_magic": true,  
   ...
}

When prompt for use_that_magic the valid answer should be yes or no.

Also, could be an attribute type when implement #30

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis issue/PR relates to a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions