correcting indentation problems; bad variable name after settings.py refactor; problem with debug mode