Use list comprehension to disable the whitenoise runserver static server.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-05-25 03:24:27 -04:00
parent 2a3d4eedc8
commit 5d05b4ea7c

View File

@@ -3,7 +3,10 @@ from __future__ import absolute_import, unicode_literals
from .. import * # NOQA
INSTALLED_APPS += ('test_without_migrations',)
INSTALLED_APPS -= ('whitenoise.runserver_nostatic',)
INSTALLED_APPS = [
cls for cls in INSTALLED_APPS if cls != 'whitenoise.runserver_nostatic'
]
COMMON_PRODUCTION_ERROR_LOG_PATH = '/tmp/mayan-errors.log'
@@ -15,7 +18,7 @@ TEMPLATES[0]['OPTIONS']['loaders'] = (
# Remove whitenoise from middlewares. Causes out of memory errors during test
# suit
MIDDLEWARE_CLASSES = [
cls for cls in MIDDLEWARE_CLASSES if cls !='whitenoise.middleware.WhiteNoiseMiddleware'
cls for cls in MIDDLEWARE_CLASSES if cls != 'whitenoise.middleware.WhiteNoiseMiddleware'
]
STATICFILES_STORAGE = None