Version as an environment variable
See original GitHub issueDescription
Right now the version of the project is defined explicitly here: https://github.com/pydanny/cookiecutter-django/blob/master/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__init__.py
Rationale
It is possible that I am missing the purpose of the __version__
variable, but it would fit the current structure of the project, if this value was set as an environment variable.
What are your thoughts on this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Create and Modify Environment Variables on Windows
To create or modify environment variables on Windows 10: On the Windows taskbar, right-click the Windows icon and select System. In the Settings...
Read more >Environment variable
An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of...
Read more >How do I set or change the PATH system variable?
Click Environment Variables. In the section System Variables find the PATH environment variable and select it. Click Edit. If the PATH environment variable...
Read more >Environments and versions
Environment variables are key-value pairs you can manage via the Forge CLI ... Forge app version numbers are handled automatically by the ...
Read more >Environment variables
Learn how to set environment variables for Android Studio and the command-line tools that specify things like where the SDK is installed and ......
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
@demestav maybe something like this in your
config/settings/base.py
@luzfcb Thank you for the insightful information! Indeed what you describe is what I want to achieve. How would you go and define the version variable to the git tag? This is where I thought the environment variable fits in; it is set before the application starts to the appropriate value which is then injected in the Django application.