Skip to content

Is there inheritance (or a similar concept) to override behavior of a cookiecutter? #818

@bittner

Description

@bittner

Motivation

I'm looking at cookiecutters like cookiecutter-django, and I think that I may want to add, remove or change some specific implementation details. Specifically, such details that may have difficulties to land in the cookiecutter's repository as accepted PRs (e.g. because there are opinionated changes, implementation choices that cause "religious war" discussions, and the like).

I wouldn't want to do a fork of those projects just to have my own flavor, because that obviously has disadvantages (e.g. keeping up with improvements in the original repository, etc.).

Question

Is there something like inheritance (or some other concept) in cookiecutter that would allow overriding specific behavior/features of a cookiecutter? What would be the recommended approach for such a situation?

  1. Generate the project first (with my own version of a cookiecutter that runs cookiecutter <repo-url>internally), and
  2. then adapt the pieces of the generated result (sed / search and replace / etc.)?

Note

I've seen issue #409. I don't want to go into discussions about this idea. It's really that I want to understand what is the creators' idea and/or suggested approach for any such situations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis issue/PR relates to a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions