-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from mantiumai/zim/57
Project Versioning
- Loading branch information
Showing
4 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% load chirps_version %} | ||
|
||
<div class="row justify-content-center"> | ||
chirps version {% chirps_version %} | ||
</div> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Helper template tag to get the version of the chirps app.""" | ||
from pathlib import Path | ||
|
||
from django import template | ||
|
||
register = template.Library() | ||
|
||
# Build the path to the VERSION file | ||
version_path = Path(__file__).parent.resolve() / Path('../../../VERSION') | ||
|
||
|
||
@register.simple_tag | ||
def chirps_version(): | ||
"""Return the current version of the chirps application.""" | ||
return open(version_path, encoding='utf-8').read().strip() |