From b7c4926c390f8d91375e18bf7a655d55a992739d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 18 Oct 2024 09:52:09 +0200 Subject: [PATCH] add commit_id in settings --- dashboard/mixins.py | 2 ++ dhub/settings.py | 1 + 2 files changed, 3 insertions(+) diff --git a/dashboard/mixins.py b/dashboard/mixins.py index aa63d36..af01a1b 100644 --- a/dashboard/mixins.py +++ b/dashboard/mixins.py @@ -1,4 +1,5 @@ from django.urls import resolve +from django.conf import settings from django.shortcuts import get_object_or_404, redirect, Http404 from django.utils.translation import gettext_lazy as _ from django.core.exceptions import PermissionDenied @@ -32,6 +33,7 @@ class DashboardView(LoginRequiredMixin): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context.update({ + "commit_id": settings.COMMIT, 'title': self.title, 'subtitle': self.subtitle, 'breadcrumb': self.breadcrumb, diff --git a/dhub/settings.py b/dhub/settings.py index e109072..b96710e 100644 --- a/dhub/settings.py +++ b/dhub/settings.py @@ -213,3 +213,4 @@ LOGGING = { SNAPSHOT_PATH="/tmp/" DATA_UPLOAD_MAX_NUMBER_FILES = 1000 +COMMIT = config('COMMIT', default='')