From 4caa431afb2b80bbe538688795bbd9560ecb3bed Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 9 Jun 2019 17:19:12 +0200 Subject: [PATCH] Remove unused git version --- Pipfile | 1 - gym/context_processors.py | 23 ----------------------- gym/templates/gym/navbar.html | 3 --- workout/settings.py | 2 -- 4 files changed, 29 deletions(-) delete mode 100644 gym/context_processors.py diff --git a/Pipfile b/Pipfile index ae0c765..3291e14 100644 --- a/Pipfile +++ b/Pipfile @@ -13,7 +13,6 @@ dj-database-url = "*" django-dotenv = "*" plotly = "*" django-mailgun = "*" -gitpython = "*" user-agents = "*" whitenoise = "*" requests = ">=2.20.0" diff --git a/gym/context_processors.py b/gym/context_processors.py deleted file mode 100644 index ae06ad4..0000000 --- a/gym/context_processors.py +++ /dev/null @@ -1,23 +0,0 @@ -from django.conf import settings -from git import Repo - - -def get_git_version(): - """ - Get the git version of the site. - """ - try: - repo = Repo(settings.BASE_DIR) - branch = repo.active_branch - commit = repo.head.commit.hexsha - name = u'{0}/{1}'.format(branch, commit[:7]) - return {'name': name, 'url': u'{}/tree/{}'.format(settings.REPO_URL, commit)} - except (KeyError, TypeError): - return {'name': '', 'url': ''} - - -def git_version(request): - """ - A context processor to include the git version on all pages. - """ - return {'git_version': get_git_version()} diff --git a/gym/templates/gym/navbar.html b/gym/templates/gym/navbar.html index c788d8f..bed9f19 100644 --- a/gym/templates/gym/navbar.html +++ b/gym/templates/gym/navbar.html @@ -8,9 +8,6 @@