X-Git-Url: https://git.mdrn.pl/django-ssify.git/blobdiff_plain/64c5163e7aead7eb60951e040998ade343c079c5..bc43e9922ca91c95797311937e7b5c0134211db5:/runtests.py diff --git a/runtests.py b/runtests.py index 4fd6a9d..4c0bdea 100644 --- a/runtests.py +++ b/runtests.py @@ -40,7 +40,17 @@ if not settings.configured and not os.environ.get('DJANGO_SETTINGS_MODULE'): ], LANGUAGE_CODE='pl', MEDIA_URL='/media/', - MIDDLEWARE_CLASSES=[ + MIDDLEWARE_CLASSES=[ # Django < 1.10 + 'django.middleware.csrf.CsrfViewMiddleware', + 'ssify.middleware.SsiMiddleware', + 'django.middleware.cache.UpdateCacheMiddleware', + 'ssify.middleware.PrepareForCacheMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'ssify.middleware.LocaleMiddleware', + 'django.middleware.cache.FetchFromCacheMiddleware', + ], + SMIDDLEWARE = [ # Django < 1.10 'django.middleware.csrf.CsrfViewMiddleware', 'ssify.middleware.SsiMiddleware', 'django.middleware.cache.UpdateCacheMiddleware', @@ -53,12 +63,26 @@ if not settings.configured and not os.environ.get('DJANGO_SETTINGS_MODULE'): STATIC_URL='/static/', ROOT_URLCONF='tests.urls', SITE_ID=1, - TEMPLATE_CONTEXT_PROCESSORS=( + TEMPLATE_CONTEXT_PROCESSORS=( # Django < 1.8 "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.tz", "django.core.context_processors.request", ), + TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + "django.template.context_processors.debug", + "django.template.context_processors.i18n", + "django.template.context_processors.tz", + "django.template.context_processors.request", + ], + } + }, + ] ) try: