Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.62 KB | None | 0 0
  1. import os
  2. from datetime import timedelta
  3.  
  4. DATABASES = {
  5. 'default': {
  6. 'ENGINE': os.environ.get('DATABASE_ENGINE', 'django.db.backends.postgresql'),
  7. 'NAME': os.environ.get('DATABASE_NAME', 'ukg'),
  8. 'USER': os.environ.get('DATABASE_USER', ''),
  9. 'PASSWORD': os.environ.get('DATABASE_PASSWORD', ''),
  10. 'HOST': os.environ.get('DATABASE_HOST', 'localhost'),
  11. 'PORT': os.environ.get('DATABASE_PORT', '5432'),
  12. 'ATOMIC_REQUESTS': os.environ.get('DATABASE_ATOMIC_REQUESTS', True),
  13. }
  14. }
  15.  
  16. COMMISSION_NUMBERING_PATTERN = os.environ.get(
  17. 'COMMISSION_NUMBERING_PATTERN',
  18. "{partner.number}-{date.yyyy}-{date.mm}"
  19. )
  20.  
  21. # POLICY_NUMBERING_PATTERN = 'TIGER-<d><Y><y><m>-<n>-<bp><p>'
  22. # QUOTATION_NUMBERING_PATTERN = 'QOT-<d><y>'
  23. POLICY_NUMBERING_PATTERN = "WPP/{number:06d}/{policy.current_version.headers_dict[source]}"
  24. QUOTATION_NUMBERING_PATTERN = "WPQ/{number:06d}/{policy.current_version.headers_dict[source]}"
  25.  
  26. DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  27. PRIVATE_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
  28.  
  29. DEFAULT_FROM_EMAIL = 'noreply@tigerlab.com'
  30.  
  31. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  32. EMAIL_HOST = 'smtp.gmail.com'
  33. EMAIL_HOST_USER = 'noreply@tigerlab.com'
  34. # EMAIL_HOST_PASSWORD = 'I2go2018!'
  35. EMAIL_HOST_PASSWORD = 'disabled'
  36. EMAIL_PORT = 587
  37. EMAIL_USE_TLS = True
  38.  
  39. JWT_AUTH = {
  40. # how long the original token is valid for
  41. 'JWT_EXPIRATION_DELTA': timedelta(days=7),
  42.  
  43. # allow refreshing of tokens
  44. 'JWT_ALLOW_REFRESH': True,
  45.  
  46. # this is the maximum time AFTER the token was issued that
  47. # it can be refreshed. exprired tokens can't be refreshed.
  48. 'JWT_REFRESH_EXPIRATION_DELTA': timedelta(days=7),
  49. }
  50.  
  51. INSURANCE_DIR = os.path.dirname(os.path.abspath(__file__))
  52. SRC_DIR = os.path.dirname(INSURANCE_DIR)
  53.  
  54. ###############################################################################
  55.  
  56. template_dirs = [
  57. os.path.join(SRC_DIR, 'templates'),
  58. ]
  59.  
  60. CLIENT_TEMPLATE = 'purbeck'
  61. # CLIENT_TEMPLATE = 'asokamas'
  62. CLIENT_TEMPLATE = 'peliwica'
  63.  
  64.  
  65. if CLIENT_TEMPLATE:
  66. CLIENT_TEMPLATE_PATH = 'template_overrides/templates/clients/{client}'.format(
  67. client=CLIENT_TEMPLATE,
  68. )
  69.  
  70. template_dirs.insert(
  71. 0,
  72. os.path.join(SRC_DIR, CLIENT_TEMPLATE_PATH)
  73. )
  74.  
  75. TEMPLATES = [
  76. {
  77. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  78. 'DIRS': template_dirs,
  79. 'OPTIONS': {
  80. 'context_processors': [
  81. 'django.template.context_processors.debug',
  82. 'django.template.context_processors.request',
  83. 'django.contrib.auth.context_processors.auth',
  84. 'django.contrib.messages.context_processors.messages',
  85. 'core.context_processors.settings',
  86. # 'permissions.context_processors.navigations',
  87. ],
  88. 'loaders': [
  89. 'django.template.loaders.filesystem.Loader',
  90. 'django.template.loaders.app_directories.Loader',
  91. ],
  92. },
  93. },
  94. ]
  95.  
  96. CUSTOM_TEMPLATE_FOLDER = os.environ.get('CUSTOM_TEMPLATE_FOLDER', None),
  97. if CUSTOM_TEMPLATE_FOLDER:
  98. TEMPLATES[0]['DIRS'] += (CUSTOM_TEMPLATE_FOLDER, )
  99.  
  100. INSTALLED_WIZARDS = [
  101. {'text': 'Travel', 'icon': 'plane', 'url': 'dashboards:wizards:travel:index'},
  102. {'text': 'Motor', 'icon': 'car', 'url': 'dashboards:wizards:motor:index'},
  103. # {'text': 'Ktipp', 'icon': 'suitcase', 'url': 'dashboards:wizards:ktipp:index'},
  104. {'text': 'Personal Guarantee', 'icon': 'suitcase', 'url': 'dashboards:wizards:purbeck:index'},
  105. {'text': 'Travel', 'icon': 'plane', 'url': 'dashboards:wizards:asokamas:index'},
  106. {'text': 'Travel', 'icon': 'plane', 'url': 'dashboards:wizards:buana:index'},
  107. {'text': 'Peliwica Insurance', 'icon': 'suitcase', 'url': 'dashboards:wizards:peliwica:index'},
  108. ]
  109.  
  110. EXTERNAL_URL = {
  111. 'purbeck': {
  112. 'csp': 'https://purbeck-hotfix.i2go.io',
  113. 'rating': 'https://purbeck-rating-hotfix.i2go.io',
  114. },
  115. }
  116.  
  117. ENABLE_REFERRAL = True
  118. AGENT_REFERRAL_LINK = os.environ.get('AGENT_REFERRAL_LINK', 'https://purbeck-hotfix.i2go.io?rid=')
  119.  
  120. ###############################################################################
  121.  
  122.  
  123. SHOW_JSON_AS_DICTIONARY = False
  124.  
  125.  
  126. ###############################################################################
  127. # PAYMENT SETTINGS
  128. ###############################################################################
  129.  
  130. PAYMENT = {
  131. 'STRIPE': {
  132. 'SECRET_KEY': 'sk_test_5yF1z4rR2yq9wonwNV2mbQup',
  133. 'PUBLISHABLE_KEY': 'pk_test_UM42rC1bInNuLnMIArc65HkO',
  134. },
  135. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement