|
| 1 | +""" |
| 2 | +Django settings for test_project project. |
| 3 | +
|
| 4 | +Generated by 'django-admin startproject' using Django 3.2.8. |
| 5 | +
|
| 6 | +For more information on this file, see |
| 7 | +https://docs.djangoproject.com/en/3.2/topics/settings/ |
| 8 | +
|
| 9 | +For the full list of settings and their values, see |
| 10 | +https://docs.djangoproject.com/en/3.2/ref/settings/ |
| 11 | +""" |
| 12 | + |
| 13 | +from pathlib import Path |
| 14 | + |
| 15 | +# Build paths inside the project like this: BASE_DIR / 'subdir'. |
| 16 | +BASE_DIR = Path(__file__).resolve().parent.parent |
| 17 | + |
| 18 | + |
| 19 | +# Quick-start development settings - unsuitable for production |
| 20 | +# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ |
| 21 | + |
| 22 | +# SECURITY WARNING: keep the secret key used in production secret! |
| 23 | +SECRET_KEY = 'django-insecure-7db3wq7w6q@g3h^al9&ji=una44&ba+i#pz=@q=$+#&cx6%@$g' |
| 24 | + |
| 25 | +# SECURITY WARNING: don't run with debug turned on in production! |
| 26 | +DEBUG = True |
| 27 | + |
| 28 | +ALLOWED_HOSTS = [] |
| 29 | + |
| 30 | + |
| 31 | +# Application definition |
| 32 | + |
| 33 | +INSTALLED_APPS = [ |
| 34 | + 'test_project.tests', |
| 35 | +] |
| 36 | + |
| 37 | +MIDDLEWARE = [] |
| 38 | + |
| 39 | +ROOT_URLCONF = 'test_project.urls' |
| 40 | + |
| 41 | +TEMPLATES = [ |
| 42 | + { |
| 43 | + 'BACKEND': 'django.template.backends.django.DjangoTemplates', |
| 44 | + 'DIRS': [], |
| 45 | + 'APP_DIRS': True, |
| 46 | + 'OPTIONS': { |
| 47 | + 'context_processors': [ |
| 48 | + 'django.template.context_processors.debug', |
| 49 | + 'django.template.context_processors.request', |
| 50 | + 'django.contrib.auth.context_processors.auth', |
| 51 | + 'django.contrib.messages.context_processors.messages', |
| 52 | + ], |
| 53 | + }, |
| 54 | + }, |
| 55 | +] |
| 56 | + |
| 57 | +WSGI_APPLICATION = 'test_project.wsgi.application' |
| 58 | + |
| 59 | + |
| 60 | +# Database |
| 61 | +# https://docs.djangoproject.com/en/3.2/ref/settings/#databases |
| 62 | + |
| 63 | +DATABASES = { |
| 64 | + 'default': { |
| 65 | + 'ENGINE': 'django.db.backends.sqlite3', |
| 66 | + 'NAME': BASE_DIR / 'db.sqlite3', |
| 67 | + } |
| 68 | +} |
| 69 | + |
| 70 | + |
| 71 | +# Password validation |
| 72 | +# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators |
| 73 | + |
| 74 | +AUTH_PASSWORD_VALIDATORS = [] |
| 75 | + |
| 76 | + |
| 77 | +# Internationalization |
| 78 | +# https://docs.djangoproject.com/en/3.2/topics/i18n/ |
| 79 | + |
| 80 | +LANGUAGE_CODE = 'en-gb' |
| 81 | + |
| 82 | +TIME_ZONE = 'UTC' |
| 83 | + |
| 84 | +USE_I18N = True |
| 85 | + |
| 86 | +USE_L10N = True |
| 87 | + |
| 88 | +USE_TZ = True |
| 89 | + |
| 90 | + |
| 91 | +# Static files (CSS, JavaScript, Images) |
| 92 | +# https://docs.djangoproject.com/en/3.2/howto/static-files/ |
| 93 | + |
| 94 | +STATIC_URL = '/static/' |
| 95 | + |
| 96 | +# Default primary key field type |
| 97 | +# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field |
| 98 | + |
| 99 | +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' |
| 100 | + |
| 101 | + |
| 102 | +# Celery Setup |
| 103 | +# http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html |
| 104 | +CELERY_BROKER_URL = 'amqp://127.0.0.1/' |
| 105 | +CELERY_RESULT_BACKEND = 'celery_amqp_backend.AMQPBackend://' |
| 106 | +CELERY_BROKER_POOL_LIMIT = 10 |
| 107 | +CELERY_TASK_DEFAULT_QUEUE = 'tests.default' |
| 108 | +CELERY_EVENT_QUEUE_PREFIX = 'tests.event' |
| 109 | +CELERY_RESULT_EXCHANGE = 'tests.result' |
| 110 | +CELERY_EVENT_EXCHANGE = 'tests.event' |
| 111 | +CELERY_CONTROL_EXCHANGE = 'tests.control' |
| 112 | +CELERY_ACCEPT_CONTENT = [ |
| 113 | + 'json', |
| 114 | +] |
| 115 | +CELERY_TASK_DEFAULT_DELIVERY_MODE = 'transient' |
| 116 | +CELERY_RESULT_EXPIRES = 60 |
| 117 | +CELERY_RESULT_PERSISTENT = False |
| 118 | +CELERY_TASK_ACKS_LATE = False |
| 119 | +CELERY_TASK_TRACK_STARTED = False |
| 120 | +CELERY_TASK_IGNORE_RESULT = False |
| 121 | +CELERY_WORKER_PREFETCH_MULTIPLIER = 1 |
0 commit comments