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
0
votes
1 answer

Don't ask for a derived variable in cookiecutter

This is my cookiecutter.json file: { "day": "1", "directory_name": "day-{{ cookiecutter.day }}" } Now I only want to be prompted for the day, but not for the directory_name which is derived from it. How do I get that to happen? The…
Alper
  • 3,424
  • 4
  • 39
  • 45
0
votes
1 answer

pre_gen_project hook script didn't exit successfully

Generating a dash component project using cookiecutter. Followed the installation guide of dash-component-boilerplate: https://github.com/plotly/dash-component-boilerplate Ubuntu 18.04.5 (WSL) Node - v8.10.0 NPM - 3.5.2 python - 3.6.9 pip -…
0
votes
1 answer

django clone project migrate error occured

"django.db.utils.OperationalError" occurred while setting using django cookiecutter. config\settings\base.py DATABASES = { "default": env.db( "DATABASE_URL", default="postgres://postgres:root@localhost:5432/instagram", …
krsai
  • 1
  • 1
0
votes
1 answer

ModuleNotFoundError: No module named 'cookiecutter'

Just upgraded my Mac to macOS Monterey 12.6, I am trying to use the python to create a project from a cookiecutter, throws this error: ModuleNotFoundError: No module named 'cookiecutter'
Gary
  • 1
0
votes
1 answer

Cookiecutter: Add information to pyproject.toml according to template variable

In my cookiecutter template, I have the following question: "Do you want to use an internal repository? ["Yes", "No"]. If answered "Yes", I would like to add another table to my pyproject.toml configuration file. [[tool.poetry.source]] name =…
Andi
  • 3,196
  • 2
  • 24
  • 44
0
votes
1 answer

ModuleNotFoundError: No module named 'kedro.versioning'

i have upgraded my kedro to latest version.But i have used kedro.versioning in my project.And latest kedro has no module of this name.Can anyone please suggest anything
pc01
  • 11
  • 1
0
votes
1 answer

Cannot get cookiecutter to run properly on amazon linux

When running this command locally on mac, this works fine. However when running the same command on amazon linux, i get this issue: command: cookiecutter -f -v --no-input --config-file config.yaml…
0
votes
1 answer

Django Cookiecutter Database restore

I'm trying to restore the database with the maintenance script provided. But there is a check in the script which doesn't allow me to restore if the user is postgres. Any reason for that ?
0
votes
2 answers

dpkg-buildpackage with cookiecutter invalid or non-existing path to the source directory: debian/sampleproject

Hello I'm trying to create a deb package from a python project with virtualenv and to do it I'm using cookiecutter. I've never created a deb package in my life and so I'm following the guide listed here but i had some problems trying to build the…
0
votes
1 answer

How to set default in case of undefined variable in template for cookiecutter?

I am using cookiecutter 1.7.3 I want a way to have defaults in case an undefined variable in the template. What I tried using default filter in jinja "github_username": "{{ cookiecutter.github_repo.owner.login|default('Your GitHub username here',…
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282
0
votes
1 answer

Cookiecutter copy one folder to multiple folders with different names

My Cookiecutter project is structured like this ├── project │ ├── {{Cookiecutter.client_name}} │ │ ├── {{Cookiecutter.account_name}} │ │ │ │── some-folder │ │ │ ├── {{Cookiecutter.account_name}}.py cookiecutter.json looks like…
Yaman Ahlawat
  • 477
  • 6
  • 17
0
votes
1 answer

AWS CloudFormation create parameterized CodeCommit repository

I have a CloudFormation template which creates a simple CodeCommit repository and places some code in it, based on a ZIP file in S3. However, the code inside this ZIP file has been parameterized using Cookiecutter. Right now the CloudFormation…
vdvaxel
  • 667
  • 1
  • 14
  • 41
0
votes
1 answer

Cookiecutter - Django: Anymail[SES] boto3 region error

I am trying to deploy to AWS(EC2) a Cookiecutter Django project. The AWS user with this credentials has ful S3, SES and SNS policies. The EC2 server has also a role with full SES/S3 policies. In production file in envs I have the keys set up like…
0
votes
1 answer

Cookiecutter : jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got ':'

I am trying to learn how to use cookiecutter and have created my own django based project that contains some static jinja2 templates referencing .js, .map files. I have created and adapted this from a working local project that successfully displays…
dcs3spp
  • 493
  • 1
  • 9
  • 23
0
votes
1 answer

Generate random letters using Jinja for cookiecutter template

I am looking to generate a random 8 letter hash for a cookeicutter template. In pure Python, this would generate what I'd like: In [3]: import random In [3]: import string In [4]: ''.join(random.choice(string.ascii_lowercase) for i in range(8)) …
sgerbhctim
  • 3,420
  • 7
  • 38
  • 60
1 2 3
8 9