master_settings.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright © 2023 Ingram Micro Inc. All rights reserved.
  2. import os
  3. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  4. SECRET_KEY = '6^1@%4#qtc+bookwp4w5k-+nbo+clm!skzdhnyl@rf&06b5tl7'
  5. DEBUG = True
  6. ALLOWED_HOSTS = []
  7. # Application definition
  8. INSTALLED_APPS = [
  9. 'django.contrib.auth',
  10. 'django.contrib.contenttypes',
  11. 'django.contrib.sessions',
  12. 'django.contrib.messages',
  13. 'dj_cqrs',
  14. 'tests.dj_master',
  15. ]
  16. MIDDLEWARE = [
  17. 'django.middleware.security.SecurityMiddleware',
  18. 'django.contrib.sessions.middleware.SessionMiddleware',
  19. 'django.middleware.common.CommonMiddleware',
  20. 'django.middleware.csrf.CsrfViewMiddleware',
  21. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  22. 'django.contrib.messages.middleware.MessageMiddleware',
  23. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  24. ]
  25. ROOT_URLCONF = 'tests.dj.urls'
  26. DATABASES = {
  27. 'default': {
  28. 'ENGINE': 'django.db.backends.sqlite3',
  29. 'NAME': os.path.join(BASE_DIR, 'db/master_db.sqlite3'),
  30. },
  31. }
  32. LANGUAGE_CODE = 'en-us'
  33. TIME_ZONE = 'UTC'
  34. USE_I18N = True
  35. USE_L10N = True
  36. USE_TZ = True
  37. CQRS = {
  38. 'transport': os.getenv('CQRS_MASTER_TRANSPORT'),
  39. 'url': os.getenv('CQRS_BROKER_URL'),
  40. 'master': {
  41. 'CQRS_MESSAGE_TTL': 3600,
  42. },
  43. }
  44. DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'