flake8 and doc fixes for refs #22257.
Some contributions to Django.