Beispiel #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))
Beispiel #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
Beispiel #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
Beispiel #4
0
 def get_context_data(self, **kwargs):
     return SingleObjectMixin.get_context_data(self, **kwargs)
Beispiel #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
Beispiel #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
Beispiel #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