Fix horizon for Pike

Fix null log handler to use python2.7 nativelly provided,
as  was dropped from Django.

Remove setting custom cache backend options as we do not
use custom cache anymore.

Change-Id: I8367b51428f3e49455a5599786b81d9bfaaecd08
Related-Prod: 17367
diff --git a/horizon/files/horizon_settings/_horizon_settings.py b/horizon/files/horizon_settings/_horizon_settings.py
index a95f48a..144b51e 100644
--- a/horizon/files/horizon_settings/_horizon_settings.py
+++ b/horizon/files/horizon_settings/_horizon_settings.py
@@ -41,11 +41,17 @@
     # for loggers specified in this configuration dictionary. Note that
     # if nothing is specified here and disable_existing_loggers is True,
     # django.db.backends will still log unless it is disabled explicitly.
+    {# NOTE(vsaienko) django.utils.log.NullHandler was removed in Django 1.9 as it natively provided by python 2.7 #}
+    {%- if server.version in ['mitaka'] %}
+      {%- set null_handler_class = 'django.utils.log.NullHandler' %}
+    {%- else %}
+      {%- set null_handler_class = 'logging.NullHandler' %}
+    {%- endif %}
     'disable_existing_loggers': False,
     'handlers': {
         'null': {
             'level': 'DEBUG',
-            'class': 'django.utils.log.NullHandler',
+            'class': '{{ null_handler_class }}',
         },
         'console': {
             # Set the level to "DEBUG" for verbose output logging.
diff --git a/horizon/files/horizon_settings/_local_settings.py b/horizon/files/horizon_settings/_local_settings.py
index ba4c97f..bf17ebb 100644
--- a/horizon/files/horizon_settings/_local_settings.py
+++ b/horizon/files/horizon_settings/_local_settings.py
@@ -28,12 +28,14 @@
 
 CACHES = {
     'default': {
-
+{# TODO(vsaienko) remove this as we do not have custom cache backend starting from Pike #}
+{%- if server.version in ['mitaka', 'newton', 'ocata'] %}
         'OPTIONS': {
                 'DEAD_RETRY': 1,
                 'SERVER_RETRIES': 1,
                 'SOCKET_TIMEOUT': 1,
         },
+{%- endif %}
         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
         {%- if app.cache.members is defined %}
         'LOCATION': "{%- for member in app.cache.members %}{{ member.host }}:{{ member.port }}{% if not loop.last %};{% endif %}{%- endfor %}"