diff --git a/friends_map/settings.py b/friends_map/settings.py index cdc2c48..df5e1a4 100644 --- a/friends_map/settings.py +++ b/friends_map/settings.py @@ -79,7 +79,6 @@ TEMPLATES = [ 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'map.context_processors.app_settings', - 'map.context_processors.git_version', ], }, }, diff --git a/map/context_processors.py b/map/context_processors.py index 7e1745c..c73a500 100644 --- a/map/context_processors.py +++ b/map/context_processors.py @@ -1,28 +1,6 @@ -from git import Repo - from django.conf import settings -def get_git_version(): - """ - Get the git version of the site. - """ - try: - repo = Repo(settings.BASE_DIR) - commit = repo.head.commit.hexsha - name = commit[:7] - return {'name': name, 'url': u'{}/commit/{}'.format(settings.APP['site']['repository']['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()} - - def app_settings(request): """ A context processor with all APP settings. diff --git a/map/templates/map/navbar.html b/map/templates/map/navbar.html index b44f22d..33c97b0 100644 --- a/map/templates/map/navbar.html +++ b/map/templates/map/navbar.html @@ -8,9 +8,6 @@