diff --git a/action/urls.py b/action/urls.py index 193a431..d38bc20 100644 --- a/action/urls.py +++ b/action/urls.py @@ -6,7 +6,6 @@ app_name = 'action' urlpatterns = [ path("new/", views.ChangeStateView.as_view(), name="change_state"), - path('state//undo/', views.UndoStateView.as_view(), name='undo_state'), path('note/add/', views.AddNoteView.as_view(), name='add_note'), - + path('note/edit/', views.UpdateNoteView.as_view(), name='update_note'), ] diff --git a/action/views.py b/action/views.py index 1975d68..21aadb3 100644 --- a/action/views.py +++ b/action/views.py @@ -41,18 +41,6 @@ class ChangeStateView(View): return redirect(request.META.get('HTTP_REFERER') ) -class UndoStateView(DeleteView): - model = State - - def delete(self, request, *args, **kwargs): - self.object = self.get_object() - return super().delete(request, *args, **kwarg) - - def get_success_url(self): - messages.info(self.request, f"Action to state: {self.object.state} has been deleted.") - return self.request.META.get('HTTP_REFERER', reverse_lazy('device:details', args=[self.object.snapshot_uuid])) - - class AddNoteView(View): def post(self, request, *args, **kwargs):