From e6c845821cc09dfac4c9975631a31e56851abca9 Mon Sep 17 00:00:00 2001 From: Thomas Rusiecki Date: Mon, 30 Dec 2024 15:25:57 -0300 Subject: [PATCH] better success message and removed devicelog var --- action/views.py | 4 ++-- dhub/settings.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/action/views.py b/action/views.py index 54f3c71..1975d68 100644 --- a/action/views.py +++ b/action/views.py @@ -7,7 +7,6 @@ from django.urls import reverse_lazy from django.utils.translation import gettext_lazy as _ from action.models import State, StateDefinition, Note, DeviceLog from device.models import Device -import logging class ChangeStateView(View): @@ -34,7 +33,8 @@ class ChangeStateView(View): user=self.request.user, institution=self.request.user.institution, ) - messages.success(request,message) + + messages.success(request, _("State succesfuly changed from '{}' to '{}' ".format(previous_state, new_state) ) ) else: messages.error(request, "There was an error with your submission.") diff --git a/dhub/settings.py b/dhub/settings.py index fbfb4fc..1cef207 100644 --- a/dhub/settings.py +++ b/dhub/settings.py @@ -65,7 +65,6 @@ ENABLE_EMAIL = config("ENABLE_EMAIL", default=True, cast=bool) EVIDENCES_DIR = config("EVIDENCES_DIR", default=os.path.join(BASE_DIR, "db")) -DEVICE_LOG_PATH = config("DEVICE_LOG_PATH", default="/tmp") # Application definition