Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added uuid extension to be able to generate uuids #1493

Merged
merged 6 commits into from Apr 27, 2021
Merged

Added uuid extension to be able to generate uuids #1493

merged 6 commits into from Apr 27, 2021

Conversation

jonaswre
Copy link
Contributor

@jonaswre jonaswre commented Jan 21, 2021

Fixes #1101

I aiming to generate uuids from directly from jinja2. Ansible has an extension exactly like this.

These are only a few lines in non tighly coupled part. So this will not interfere with other parts of the application.

I guess you cloud add a custom extension for this as well but to be honest this is such a basic functionality, far more basic then the slugify extension.
A custom extension will always mean the cookiecutters are not very portable. Since the extension must be install as a python package on every client. (correct me if im wrong).

Thanks for the consideration.

@RobRoseKnows
Copy link

This fixes #1101 which is a big issue for C# cookiecutters. @cookiecutter could you get this reviewed?

@jonaswre
Copy link
Contributor Author

jonaswre commented Feb 8, 2021

Any news? I kind of need this feature.
Can a reviewer please review this. I wouldn't mind paying for this pull request. If funding is the issue.

Thanks

@samj1912
Copy link

I think it might be better to review/merge #1240 instead which should provide this functionality and more.

@ssbarnea ssbarnea added the feature This issue/PR relates to major feature request. label Apr 27, 2021
@ssbarnea ssbarnea merged commit 8fc8560 into cookiecutter:master Apr 27, 2021
@simobasso simobasso mentioned this pull request May 15, 2021
cagonza6 pushed a commit to cagonza6/cookiecutter that referenced this pull request Jun 16, 2021
* Update extensions.py

* Added tests and full function

* fixed bug

* fixed call

* Fixed doc string

* linting
@Garulf
Copy link

Garulf commented Aug 14, 2021

This extension is not included in the latest release 1.7.3 but is mentioned in the latest documentation leading to very confusing errors.
image

Unable to create file 'plugin.json'
Error message: 'uuid4' is undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to major feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need help with generating GUID/UUID values for context variables
5 participants