From 2b279fd175b6c58c2c300fa5f1f484fbe6b4f518 Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Mon, 25 Dec 2017 11:55:12 -0500 Subject: [PATCH] Remove timer start messages. These are not needed as the Timer model, unlink other models, redirects to the newly added instance (instead of the instances list). --- core/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/views.py b/core/views.py index fdae6ca4..67212de3 100644 --- a/core/views.py +++ b/core/views.py @@ -232,7 +232,7 @@ class TimerDetail(PermissionRequiredMixin, DetailView): permission_required = ('core.view_timer',) -class TimerAdd(CoreAddView): +class TimerAdd(PermissionRequiredMixin, CreateView): model = models.Timer permission_required = ('core.add_timer',) form_class = forms.TimerForm @@ -268,7 +268,6 @@ class TimerAddQuick(PermissionRequiredMixin, RedirectView): def get(self, request, *args, **kwargs): instance = models.Timer.objects.create(user=request.user) instance.save() - messages.success(request, '{} started!'.format(instance)) self.url = request.GET.get( 'next', reverse('core:timer-detail', args={instance.id})) return super(TimerAddQuick, self).get(request, *args, **kwargs)