1 2 3 4 5 6 7 | from django.middleware.gzip import GZipMiddleware
class FixedGZipMiddleware(GZipMiddleware):
def process_response(self, request, response):
if hasattr(response, 'dontgzip'):
return response
return GZipMiddleware.process_response(self, request, response)
|
More like this
- Improved Pickled Object Field by taavi223 3 years, 10 months ago
- Gzip decorator by SmileyChris 4 years, 11 months ago
- Logging Middleware by Magus 5 years, 8 months ago
- XhtmlMortifierMiddleware by jgelens 5 years, 2 months ago
- pyText2Pdf - Python script to convert plain text into PDF file. Modified to work with streams. by vsergeyev 3 years, 7 months ago
Comments