title: django delete view override delete method
body: <p>im using the delete view and i want to customize the action of the deletion.</p>
  
  <p>there are some checks i need to do before deleting the object and in case the </p>
  
  <p>checks doesn't pass i want to redirect to the same view and show a matching </p>
  
  <p>massage (just like i can do in the form_valid method with the form.add_error </p>
  
  <p>and return self.form_invalid(form)).</p>
  
  <p>so i have the following delete method:</p>
  
  <pre><code>def delete(self, request, *args, **kwargs):
      if XXXX:
          ### add_error and return a massage ###
      else:
          return super(delete, self).delete(request, *args, **kwargs)  
  </code></pre>
  
  <p>what i need/can do in the "if" to prevent the deletion and explain the user </p>
  
  <p>what the problem is?</p>
  
  <p>thx</p>