dreamer
dreamer

Reputation: 478

Gzip error with django latest version

I get an error when i include the line "django.middleware.gzip" under the middleware section in settings.py in the django framework. I checked the gzip file location in the nginx server , its present and looks correct.

I am getting a 500 internal server error. Can anyone help me with this?

I cant even see logs for this error.

i have set my DEBUG = True in setting.py, but still it is not showing any logs for the error. It is just showing 500 internal server error. I also did below steps to check the debug setting -

python manage.py shell
>> from django.core.management import settings
>> settings.DEBUG

It showed it as True. How do I check the gzip error now?

Upvotes: 0

Views: 324

Answers (1)

Alasdair
Alasdair

Reputation: 309099

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.

Upvotes: 1

Related Questions