Fixes a Python 3.x regression introduced in a19e9d80
Merge pull request #1135 from ambv/model_validation_fix

Fixes a Python 3.x regression introduced in a19e9d80
Fixed #20284 - Added a note about DEBUG in static file docs.

Thanks wim@ for the suggestion and Nicolas Noé for the patch.