... cookiecutter: conditionals and sets


The contents of the cookiecutter.json file;

  "project": "project",
  "author": "author",
  "project_slug": "{{cookiecutter.project.lower().replace(' ', '_')}}",
  "license": ["MIT", "BSD"]

The contents of the readme.md file;

# readme of {{cookiecutter.project}}

This package was made by {{cookiecutter.author}}.

{%- if cookiecutter.license == "MIT" -%}

This is an MIT license. 

{%- elif cookiecutter.license == "BSD" -%}

This is a BSD license. 

{% endif %}

Feedback? See an issue? Something unclear? Feel free to mention it here.

If you want to be kept up to date, consider signing up for the newsletter.