Reputation: 478
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
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