Working patch for ticket #20625 to allow defining chainable QuerySets on custom model managers.