Support for renaming the cookiecutter dict
See original GitHub issueDescription:
Is there any support for renaming the cookiecutter object to something shorter? I’m finding cookiecutter
to be one of those words that are hard to type, and would like to use something like cc
in Jinja templates instead
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Remove 'cookiecutter' namespacing · Issue #380 - GitHub
Support for renaming the cookiecutter dict #1166 - Renaming cookiecutter dictionary; Parametrize namespace #1233 - Parametrize namespace; alias ...
Read more >cookiecutter Documentation
Supports unlimited levels of directory nesting. ... Don't worry about naming/pinpointing the issue properly. • Ask for help on Slack if you ...
Read more >Cookiecutter: how do you override a dictionary variable using ...
but the former does nothing and the latter just replaces the entire app parameter with the string {\"name\":\"my-new-name\"} (it doesn't parse ...
Read more >Cookiecutter V2 Context Specification Documentation
Special Overwrite Syntax for Renaming a Variable . ... support features in the future that will enhance the overall user experience.
Read more >Project Templates with Cookiecutter - YouTube
When we start new projects we want to solve a problem, not write boilerplate. Cookiecutter helps you to stop writing boilerplate.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wadkar sorry I can’t really follow you. How do you even make out such a simple issue as additional alias so complicated. How could anyone have trouble reading
cc
instead ofcookiecutter
.You can close this issue and my PR for all I care, I raised my proposal and clearly there’s nothing of value to discuss here.
For those who want the alias I’m maintaining a fork and pypi repo:
https://github.com/Granitosaurus/cookiecutter-cc https://pypi.org/project/cookiecutter-cc/
bye.
Personally, I am not worried about typing
cookiecutter
because one reads a variable an order of magnitude more than one writes. Perhapsexplicit is better than implicit
can be considered useful here?Not to disregard any usability concerns, I do like the third option suggested earlier, i.e.
{{foo}}.{{bar}}
though I am not sure how it can be achieved without surprising the user too much.As it stands, I don’t mind the status-quo and use the cookiecutter variable in jinja2 template. As for providing a shorter alias or renaming, wouldn’t something like
{%- cc = cookiecutter -%}
at the beginning of template work for those who want shorter/cryptic name?Finally, please understand this issue is the hardest problem in CS/SE : Naming Things! I would be happy to hear what other users/developers have to say about it.