aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/context_processors.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-09-02 22:19:45 +0100
committerGravatar GitHub <[email protected]>2020-09-02 22:19:45 +0100
commit55d4b8ff7457629676c3964581900c0328cb4673 (patch)
treeca14eea4be10f530f216b3f371cabfef345792c1 /pydis_site/context_processors.py
parentMerge pull request #349 from ks129/tags-cleanup (diff)
parentMerge branch 'master' into add_deployment_info (diff)
Merge pull request #376 from python-discord/add_deployment_info
Add deployment info and set up Sentry releases
Diffstat (limited to 'pydis_site/context_processors.py')
-rw-r--r--pydis_site/context_processors.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pydis_site/context_processors.py b/pydis_site/context_processors.py
new file mode 100644
index 00000000..6937a3db
--- /dev/null
+++ b/pydis_site/context_processors.py
@@ -0,0 +1,8 @@
+from django.template import RequestContext
+
+from pydis_site.constants import GIT_SHA
+
+
+def git_sha_processor(_: RequestContext) -> dict:
+ """Expose the git SHA for this repo to all views."""
+ return {'git_sha': GIT_SHA}