|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# Django settings for froide project. |
| 3 | + |
| 4 | +from .settings import * # noqa |
| 5 | + |
| 6 | +DEBUG = False |
| 7 | + |
| 8 | +TEMPLATE_DEBUG = False |
| 9 | + |
| 10 | +DATABASES = { |
| 11 | + 'default': { |
| 12 | + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
| 13 | + 'NAME': 'test.db', # Or path to database file if using sqlite3. |
| 14 | + 'USER': '', # Not used with sqlite3. |
| 15 | + 'PASSWORD': '', # Not used with sqlite3. |
| 16 | + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
| 17 | + 'PORT': '', # Set to empty string for default. Not used with sqlite3. |
| 18 | + } |
| 19 | +} |
| 20 | + |
| 21 | +# A sample logging configuration. The only tangible logging |
| 22 | +# performed by this configuration is to send an email to |
| 23 | +# the site admins on every HTTP 500 error. |
| 24 | +# See http://docs.djangoproject.com/en/dev/topics/logging for |
| 25 | +# more details on how to customize your logging configuration. |
| 26 | +LOGGING = { |
| 27 | + 'version': 1, |
| 28 | + 'disable_existing_loggers': False, |
| 29 | + 'handlers': { |
| 30 | + 'mail_admins': { |
| 31 | + 'level': 'ERROR', |
| 32 | + 'class': 'django.utils.log.AdminEmailHandler' |
| 33 | + }, |
| 34 | + 'sentry.errors': { |
| 35 | + 'level': 'DEBUG', |
| 36 | + 'class': 'django.utils.log.AdminEmailHandler' |
| 37 | + }, |
| 38 | + 'console': { |
| 39 | + 'level': 'DEBUG', |
| 40 | + 'class': 'logging.StreamHandler', |
| 41 | + } |
| 42 | + }, |
| 43 | + 'loggers': { |
| 44 | + 'froide': { |
| 45 | + 'handlers': ['console'], |
| 46 | + 'propagate': True, |
| 47 | + 'level': 'DEBUG', |
| 48 | + }, |
| 49 | + 'sentry.errors': { |
| 50 | + 'level': 'DEBUG', |
| 51 | + 'handlers': ['console'], |
| 52 | + 'propagate': True |
| 53 | + }, |
| 54 | + 'django.request': { |
| 55 | + 'handlers': ['mail_admins'], |
| 56 | + 'level': 'ERROR', |
| 57 | + 'propagate': True, |
| 58 | + }, |
| 59 | + } |
| 60 | +} |
| 61 | + |
| 62 | +MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage' |
| 63 | + |
| 64 | +CACHES = { |
| 65 | + 'default': { |
| 66 | + # 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', |
| 67 | + 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', |
| 68 | + } |
| 69 | +} |
| 70 | + |
| 71 | +TEST_RUNNER = 'discover_runner.DiscoverRunner' |
| 72 | + |
| 73 | +# 'chrome' or 'firefox' or 'phantomjs' |
| 74 | +TEST_SELENIUM_DRIVER = 'phantomjs' |
| 75 | + |
| 76 | +# south settings |
| 77 | + |
| 78 | +SOUTH_TESTS_MIGRATE = False |
| 79 | + |
| 80 | +USE_X_ACCEL_REDIRECT = True |
| 81 | + |
| 82 | +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
| 83 | + |
| 84 | +DEFAULT_FROM_EMAIL = '[email protected]' |
| 85 | + |
| 86 | +# Default test domain |
| 87 | +FOI_EMAIL_DOMAIN = 'fragdenstaat.de' |
| 88 | + |
| 89 | +HAYSTACK_CONNECTIONS = { |
| 90 | + 'default': { |
| 91 | + 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', |
| 92 | + 'URL': 'http://127.0.0.1:9200/', |
| 93 | + 'INDEX_NAME': 'froide', |
| 94 | + }, |
| 95 | +} |
| 96 | + |
| 97 | +HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor' |
| 98 | + |
| 99 | +CELERY_HAYSTACK_MODELS = ('foirequest.FoiRequest', 'publicbody.PublicBody') |
| 100 | + |
| 101 | +CELERY_RESULT_BACKEND = "database" |
| 102 | +CELERY_RESULT_DBURI = "sqlite:///dev.db" |
| 103 | + |
| 104 | +CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler" |
| 105 | +CELERY_ALWAYS_EAGER = True |
0 commit comments