Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell cookiecutter to download a stable version of cookiecutter-django?

The command:

cookiecutter https://github.com/pydanny/cookiecutter-django/

will clone the lastest version of cookiecutter-django, which is aimed for Django 1.9.

There is a Stable section in the README pointing to some tags. One of them being https://github.com/pydanny/cookiecutter-django/releases/tag/1.8.7.

But if I try:

cookiecutter https://github.com/pydanny/cookiecutter-django/releases/tag/1.8.7

I get an error:

subprocess.CalledProcessError: Command '[u'git', u'clone', u'https://github.com/pydanny/cookiecutter-django/releases/tag/1.8.7']' returned non-zero exit status 128

So, how to specify cookiecutter to use those stable released instead of the master branch?

like image 267
jgomo3 Avatar asked Mar 24 '16 18:03

jgomo3


People also ask

What is Cookiecutter Django?

Powered by Cookiecutter, Cookiecutter Django is a project template for jumpstarting production-ready Django projects. The template offers a number of generation options, we invite you to check the dedicated page to learn more about each of them.

Where is Cookiecutter installed?

Cookiecutters (cloned Cookiecutter project templates) are put into ~/. cookiecutters/ by default, or cookiecutters_dir if specified. You can use local cookiecutters, or remote cookiecutters directly from Git repos or from Mercurial repos on Bitbucket.


1 Answers

According to cookiecutter docs, You can choose to checkout specific branch, tags and commit with CLI argument --checkout or -c

Something like this command should work:

$ cookiecutter https://github.com/pydanny/cookiecutter-django.git --checkout 1.8.7
like image 101
v1k45 Avatar answered Sep 19 '22 16:09

v1k45