Questions tagged [cookiecutter]

A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python package project template.

A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python package project template.

enter image description here

Project home.

132 questions
6
votes
1 answer

Python cookiecutter loop over list

I am trying to loop over all items in a Python cookiecutter json list and run a bash command based on each item. Setup I have the following cookiecutter.json: { "directory_name": "df-sharp", "servers": ["db", "web"], "myweb_provisioner":…
edesz
  • 11,756
  • 22
  • 75
  • 123
6
votes
1 answer

Cookiecutter: A valid repository for X could not be found in the following locations:

I'm working in win 10 with git bash and I want to create a scrapy spider from a cookiecutter template. I'm looking at https://cookiecutter.readthedocs.io/en/latest/overview.html and https://cookiecutter.readthedocs.io/en/latest/first_steps.html for…
user1592380
  • 34,265
  • 92
  • 284
  • 515
6
votes
1 answer

Is it possible to skip chosen parameters from cookiecutter.json?

I'm wondering, if it's possible to skip prompt for chosen parameters in cookiecutter.json based on value of other parameter? For example for cookiecutter.json: { "ask_for_more": ["y", "n"], "some_parameter": "test" } I'd like to skip prompt for…
pgrzesik
  • 1,869
  • 13
  • 14
6
votes
1 answer

Django AWS Elastic Beanstalk WSGIPath refers to a file that does not exist

I've tried everything suggested so far but nothing seems to work. I've created a new Django project with Cookiecutter. I'm able to run it locally and via my Docker machine but for some reason I can't get it to deploy to AWS. I've also been…
5
votes
1 answer

In a coockiecutter template, add folder only if choice variable has a given value

I am creating a cookiecutter template and would like to add a folder (and the files it contains) only if a variable has a given value. For example cookiecutter.json: { "project_slug":"project_folder" "i_want_this_folder":['y','n'] } and my…
Oneira
  • 1,365
  • 1
  • 14
  • 28
5
votes
0 answers

How can I run black formatting on a cookiecutter template?

I am using pre-commit with black and flake8 hooks. I got this error: cannot format when trying to black-format the following code from {{cookiecutter.project_name}} import my_module Is there anyway to indicate black, to skip/ignore…
4
votes
2 answers

How to update Cookiecutter Django config for existing project?

I have been building a project on top of cookiecutter django (https://github.com/pydanny/cookiecutter-django), with Celery turned off in the cookiecutter generation settings. However, now I'm finding I need Celery. Is there a way I can flip a…
personjerry
  • 1,045
  • 8
  • 28
4
votes
1 answer

Sphinx fails to import module dependencies

The python tool that writing, awscli-bastion, has the following directory structure built by cookiecutter. . ├── awscli_bastion │ ├── __init__.py │ ├── cache.py │ ├── cli.py │ ├── credentials.py │ ├── minimal.py │ └── sts.py ├── docs │ …
aidanmelen
  • 6,194
  • 1
  • 23
  • 24
4
votes
1 answer

cookiecutter-django local development with docker

I've never use docker for development on local machine so I have few questions that I didn't find in documentation. After setup I can't figure out how do I can install my packages via pip. I tried: docker-compose -f local.yml run --rm django pip…
Arti
  • 7,356
  • 12
  • 57
  • 122
4
votes
2 answers

Create a git versioned project with cookiecutter

I have a nested git repository structure, as below: outer_repository/ |-- outer_dummy_file |-- .git `-- inner_repository |-- .git `-- inner_dummy_file Is it possible to make inner_repository/.git versioned with the outer…
TheMeaningfulEngineer
  • 15,679
  • 27
  • 85
  • 143
3
votes
1 answer

Is it possible to run a Cookiecutter template file without creating the local folder?

When I use cookiecutter, especially in the first phases of the project, I find myself debugging the instantiated copy of the template, finding the problem, and then having to go back to the template to fix it there as well. This all feels redundant,…
Mike
  • 573
  • 2
  • 4
  • 18
3
votes
1 answer

How to omit curly braces when using cookiecutter?

I'm building a cookiecutter template in Python, something fairly simple for now, that looks like this: ├── {{ cookiecutter.project_name }} │ └── test.py │ └── cookiecutter.json When I run the cookiecutter command on the command line and point it…
vdvaxel
  • 667
  • 1
  • 14
  • 41
3
votes
2 answers

How to create multiple sub-folders in cookiecutter template using a sub-folder template

I want to create a template for our internal projects. The layout of the project contains a variable amount of sub-folders. I would like to specify the sub-folders to create, inside some configuration file. For example, I have the following folder…
Igor Basko
  • 319
  • 2
  • 10
3
votes
3 answers

Django CMS - cookie cutter : The form could not be loaded. Please check that the server is running correctly

I started learning web development at a company, and was tasked with making a simple app in cookiecutter django, and then integrating django-cms into it. I used django cookie-cutter to start a project, and then integrated django-cms into the project…
3
votes
2 answers

(keyError: 'CELERY_BROKER_URL')

File "C:\Users\User\path\lib\site-packages\environ\environ.py", line 277, in get_value raise ImproperlyConfigured(error_msg) django.core.exceptions.ImproperlyConfigured: Set the CELERY_BROKER_URL environment variable I'm getting this error when I…
1
2
3
8 9