From c2276dab2b3bd3488af3f1d9aab66554e7e7ebc0 Mon Sep 17 00:00:00 2001 From: Skia Date: Thu, 29 Sep 2016 12:53:09 +0200 Subject: [PATCH] Remove useless mixin --- counter/views.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/counter/views.py b/counter/views.py index 35e826de..ee1de106 100644 --- a/counter/views.py +++ b/counter/views.py @@ -87,14 +87,7 @@ class CounterTabsMixin(TabedViewMixin): }) return tab_list -class CheckTokenMixin: - def post(self, request, *args, **kwargs): - if not ('counter_token' in self.request.session.keys() and self.request.session['counter_token'] == self.object.token): - return HttpResponseRedirect(reverse_lazy('counter:details', args=self.args, - kwargs={'counter_id': self.object.id})+'?bad_location') - return super(CheckTokenMixin, self).post(request, *args, **kwargs) - -class CounterMain(CounterTabsMixin, DetailView, CheckTokenMixin, ProcessFormView, FormMixin): +class CounterMain(CounterTabsMixin, DetailView, ProcessFormView, FormMixin): """ The public (barman) view """ @@ -152,7 +145,7 @@ class CounterMain(CounterTabsMixin, DetailView, CheckTokenMixin, ProcessFormView def get_success_url(self): return reverse_lazy('counter:click', args=self.args, kwargs=self.kwargs) -class CounterClick(CounterTabsMixin, DetailView, CheckTokenMixin): +class CounterClick(CounterTabsMixin, DetailView): """ The click view This is a detail view not to have to worry about loading the counter