|
1 | 1 | # Django settings for unit test project.
|
| 2 | +import os |
| 3 | + |
| 4 | +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) |
2 | 5 |
|
3 | 6 | DEBUG = True
|
4 | 7 |
|
| 8 | +TEMPLATE_DEBUG = True |
| 9 | + |
| 10 | +ALLOWED_HOSTS = [] |
| 11 | + |
5 | 12 | DATABASES = {
|
6 | 13 | 'default': {
|
7 | 14 | 'ENGINE': 'django.db.backends.sqlite3',
|
8 |
| - 'NAME': 'database.sqlite', |
9 |
| - }, |
| 15 | + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
| 16 | + } |
10 | 17 | }
|
11 | 18 |
|
12 | 19 | SITE_ID = 1
|
|
32 | 39 | # Example: "http://media.lawrence.com/static/"
|
33 | 40 | STATIC_URL = '/static/'
|
34 | 41 |
|
| 42 | +SESSION_ENGINE = 'redis_sessions.session' |
| 43 | + |
| 44 | +SESSION_REDIS_PREFIX = 'session' |
| 45 | + |
| 46 | +TEMPLATE_CONTEXT_PROCESSORS = ( |
| 47 | + 'django.contrib.auth.context_processors.auth', |
| 48 | + 'django.core.context_processors.static', |
| 49 | + 'django.core.context_processors.request', |
| 50 | + 'ws4redis.context_processors.default', |
| 51 | +) |
| 52 | + |
35 | 53 | # List of callables that know how to import templates from various sources.
|
36 | 54 | TEMPLATE_LOADERS = (
|
37 | 55 | 'django.template.loaders.app_directories.Loader',
|
38 | 56 | )
|
39 | 57 |
|
| 58 | +# Internationalization |
| 59 | +# https://docs.djangoproject.com/en/1.7/topics/i18n/ |
| 60 | + |
| 61 | +LANGUAGE_CODE = 'en-us' |
| 62 | + |
| 63 | +TIME_ZONE = 'UTC' |
| 64 | + |
| 65 | +USE_I18N = True |
| 66 | + |
| 67 | +USE_L10N = True |
| 68 | + |
| 69 | +USE_TZ = True |
| 70 | + |
| 71 | + |
40 | 72 | TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
|
41 | 73 |
|
42 | 74 | INSTALLED_APPS = (
|
| 75 | + 'django.contrib.admin', |
43 | 76 | 'django.contrib.auth',
|
44 | 77 | 'django.contrib.contenttypes',
|
45 | 78 | 'django.contrib.sessions',
|
46 |
| - 'django.contrib.admin', |
| 79 | + 'django.contrib.messages', |
47 | 80 | 'django.contrib.staticfiles',
|
48 | 81 | 'django_nose',
|
49 | 82 | 'ws4redis',
|
|
54 | 87 | # connection shall be delivered to an authenticated Django user.
|
55 | 88 | MIDDLEWARE_CLASSES = (
|
56 | 89 | 'django.contrib.sessions.middleware.SessionMiddleware',
|
| 90 | + 'django.middleware.common.CommonMiddleware', |
| 91 | + 'django.middleware.csrf.CsrfViewMiddleware', |
57 | 92 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
|
| 93 | + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', |
58 | 94 | 'django.contrib.messages.middleware.MessageMiddleware',
|
| 95 | + 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
59 | 96 | )
|
60 | 97 |
|
61 | 98 | # This setting is required to override the Django's main loop, when running in
|
|
0 commit comments