From 268beaa70846ba0a8c06c6cf2634fb6b8067d424 Mon Sep 17 00:00:00 2001 From: Victor Fabre Date: Wed, 11 Apr 2018 12:49:30 -0300 Subject: [PATCH] Fix #1836 (#1837) --- requirements/requirements.txt | 1 + sapl/settings.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 4e8c9e452..2f6b5a8db 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -35,3 +35,4 @@ gunicorn==19.6.0 django-reversion==2.0.8 WeasyPrint==0.42 whoosh==2.7.4 +git+git://github.com/interlegis/django-speedinfo.git diff --git a/sapl/settings.py b/sapl/settings.py index 41e7015ae..22377226b 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -88,6 +88,7 @@ INSTALLED_APPS = ( 'rest_framework', 'reversion', 'whoosh', + 'speedinfo', ) + SAPL_APPS @@ -126,8 +127,16 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', + 'speedinfo.middleware.ProfilerMiddleware', ) +CACHES = { + 'default': { + 'BACKEND': 'speedinfo.backends.proxy_cache', + 'CACHE_BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', + 'LOCATION': '/var/tmp/django_cache', + } +} REST_FRAMEWORK = { "UNICODE_JSON": False,