mirror of https://github.com/snachodog/mybuddy.git
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).
This commit is contained in:
parent
19a4e54755
commit
2b279fd175
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue