Did you consider subclassing DetailView and monkey-patching views.DetailView instead of changing just the method? Somehow that feels less gross, but it would only work if the patch was made before DetailView is instantiated.