def init_request(self, object_id, *args, **kwargs):
    self.obj = self.get_object(unquote(object_id))
    if (not self.has_view_permission(self.obj)):
        raise PermissionDenied
    if (self.obj is None):
        raise Http404((_('%(name)s object with primary key %(key)r does not exist.') % {'name': force_text(self.opts.verbose_name), 'key': escape(object_id)}))
def init_request(self, object_id, *args, **kwargs):
    self.obj = self.get_object(unquote(object_id))
    if (not self.has_view_permission(self.obj)):
        raise PermissionDenied
    if (self.obj is None):
        raise Http404((_('%(name)s object with primary key %(key)r does not exist.') % {'name': force_text(self.opts.verbose_name), 'key': escape(object_id)}))