refactor requirements and make htmlmin optional
This commit is contained in:
parent
2a86e012dd
commit
c6c8dbeab4
12 changed files with 26 additions and 17 deletions
|
@ -125,10 +125,18 @@ MIDDLEWARE_CLASSES = [
|
|||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'htmlmin.middleware.HtmlMinifyMiddleware',
|
||||
'htmlmin.middleware.MarkRequestMiddleware',
|
||||
]
|
||||
|
||||
try:
|
||||
import htmlmin # noqa
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
MIDDLEWARE_CLASSES += [
|
||||
'htmlmin.middleware.HtmlMinifyMiddleware',
|
||||
'htmlmin.middleware.MarkRequestMiddleware',
|
||||
]
|
||||
|
||||
# Security settings
|
||||
X_FRAME_OPTIONS = 'DENY'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue