better success message and removed devicelog var
This commit is contained in:
parent
2d0474fcbb
commit
f85c5668be
|
@ -7,7 +7,6 @@ from django.urls import reverse_lazy
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from action.models import State, StateDefinition, Note, DeviceLog
|
from action.models import State, StateDefinition, Note, DeviceLog
|
||||||
from device.models import Device
|
from device.models import Device
|
||||||
import logging
|
|
||||||
|
|
||||||
|
|
||||||
class ChangeStateView(View):
|
class ChangeStateView(View):
|
||||||
|
@ -34,7 +33,8 @@ class ChangeStateView(View):
|
||||||
user=self.request.user,
|
user=self.request.user,
|
||||||
institution=self.request.user.institution,
|
institution=self.request.user.institution,
|
||||||
)
|
)
|
||||||
messages.success(request,message)
|
|
||||||
|
messages.success(request, _("State succesfuly changed from '{}' to '{}' ".format(previous_state, new_state) ) )
|
||||||
else:
|
else:
|
||||||
messages.error(request, "There was an error with your submission.")
|
messages.error(request, "There was an error with your submission.")
|
||||||
|
|
||||||
|
|
|
@ -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"))
|
EVIDENCES_DIR = config("EVIDENCES_DIR", default=os.path.join(BASE_DIR, "db"))
|
||||||
|
|
||||||
DEVICE_LOG_PATH = config("DEVICE_LOG_PATH", default="/tmp")
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue