1👍
django.middleware.gzip
is the module that contains the middleware, not the middleware class. To enable the gzip middleware, you should include:
'django.middleware.gzip.GZipMiddleware',
Before enabling the gzip middleware, note the warning in the docs about possible security risks.
Source:stackexchange.com