X-Git-Url: https://git.mdrn.pl/django-ssify.git/blobdiff_plain/2d7e228b32c77e5dc22381eca64dbbb510604cc1..49bb850ee3f5c4fbd32643c6019b8e1c8ccf619a:/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: