better success message and removed devicelog var
This commit is contained in:
parent
32c73f1d2b
commit
e6c845821c
|
@ -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.")
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue