title: Overriding QuerySet.delete() in Django
body: <p>I have a Django model that holds settings core to the function of an app. You should never delete this model. I'm trying to enforce this application-wide. I've disabled the delete function in the admin, and also disabled the delete method on the model, but QuerySet has it's own delete method. Example:</p>
  
  <pre><code>MyModel.objects.all()[0].delete() # Overridden, does nothing
  
  MyModel.objects.all().delete() # POOF!
  </code></pre>
  
  <p>Ironically, the Django docs say has this to say about why delete() is a method on QuerySet and not Manager:</p>
  
  <blockquote>
    <p>This is a safety mechanism to prevent you from accidentally requesting Entry.objects.delete(), and deleting all the entries.</p>
  </blockquote>
  
  <p>How having to include <code>.all()</code> is a "safety mechanism" is questionable to say the least. Instead, this effectively creates a backdoor that can't be closed by conventional means (overriding the manager).</p>
  
  <p>Anyone have a clue how to override this method on something as core as QuerySet without monkey-patching the source? </p>