Thanks to Ali Lotfi for the initial report and patch and Tim Graham for the review.
Kept the docstring short because these objects aren't very well defined and they're in the crosshairs of several refactorings.
At 2800 lines it was the largest module in the django package. This commit brings it down to a more manageable 1620 lines. Very small changes were performed to uniformize import style.