blob: 4ae0dbb3384a5180425f6bb7edcb59427c9b990f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
import git
from django.template import RequestContext
REPO = git.Repo(search_parent_directories=True)
SHA = REPO.head.object.hexsha
def git_sha_processor(_: RequestContext) -> dict:
"""Expose the git SHA for this repo to all views."""
return {'git_sha': SHA}
|