Esempio n. 1
0
    def get(self, request, *args, **kwargs):
        self.object = SingleObjectMixin.get_object(self)
        if not request.user.has_perm('catalog.can_mark_returned'):
            return HttpResponseRedirect(reverse('books'))

        return render(request, 'catalog/book_confirm_delete.html',
                      SingleObjectMixin.get_context_data(self, **kwargs))
Esempio n. 2
0
 def get_context_data(self, **kwargs):
     extra = self.get_extra_context_data()
     context = SingleObjectMixin.get_context_data(self, **kwargs)
     context.update(extra)
     return context
Esempio n. 3
0
 def get_context_data(self, **kwargs):
     extra = self.get_extra_context_data()
     context = SingleObjectMixin.get_context_data(self, **kwargs)
     context.update(extra)
     return context
Esempio n. 4
0
 def get_context_data(self, **kwargs):
     return SingleObjectMixin.get_context_data(self, **kwargs)
Esempio n. 5
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     context.update(SingleObjectMixin.get_context_data(self, **kwargs))
     return context
Esempio n. 6
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     context.update(SingleObjectMixin.get_context_data(self, **kwargs))
     return context
Esempio n. 7
0
 def get_context_data(self, **kwargs):
     data = SingleObjectMixin.get_context_data(self, **kwargs)
     data.update(FacebookViewMixin.get_context_data(self, **kwargs))
     return data