GZip Template Tag ignored if DEBUG == True

Made the gzip template tag dependent on the DEBUG settings flag, so that local development is not affected.

Also, cleaned up PEP8 issues in file.