EDIT:
The better solution for me was just using a permissions system, especially since I needed other types of controlled access to objects. I now use D
The best approach would be to use another mixin, something like this:
class AuthorRequiredMixin(object):
def dispatch(self, request, *args, **kwargs):
if self.object.author != self.request.user:
return HttpResponseForbidden()
return super(AuthorRequiredMixin, self).dispatch(request, *args, **kwargs)
Of course you can return another HttpResponse
, but keep in mind what is the proper use here.