def dispatch(self, request, *args, **kwargs): self.user_id = request.user.pk return DeleteView.dispatch(self, request, *args, **kwargs)
def dispatch(self, request, *args, **kwargs): return DeleteView.dispatch(self, request, *args, **kwargs)
def dispatch(self, request, *args, **kwargs): self.split_url() del self.kwargs['url'][-1] # exclude /delete self.success_url = u'/{0}/'.format('/'.join(self.kwargs['url'][:-1])) if len(self.kwargs['url'])>1 else '/' return DeleteView.dispatch(self, request, *args, **kwargs)