Advertisement
Mochinov

Untitled

Dec 23rd, 2021
1,054
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 21.72 KB | None | 0 0
  1. """
  2. Base settings to build other settings files upon.
  3. """
  4.  
  5. import environ
  6.  
  7. ROOT_DIR = environ.Path(__file__) - 3  # (apps/config/settings/base.py - 3 = apps/)
  8. APPS_DIR = ROOT_DIR.path('apps')
  9.  
  10. env = environ.Env()
  11.  
  12. ALLOWED_HOSTS = ['*']
  13.  
  14. READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False)
  15. if READ_DOT_ENV_FILE:
  16.     # OS environment variables take precedence over variables from .env
  17.     env.read_env(str(ROOT_DIR.path('.env')))
  18.  
  19. # GENERAL
  20. # ------------------------------------------------------------------------------
  21. # https://docs.djangoproject.com/en/dev/ref/settings/#debug
  22. DEBUG = env.bool('DJANGO_DEBUG', False)
  23. # Local time zone. Choices are
  24. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  25. # though not all of them may be available with every OS.
  26. # In Windows, this must be set to your system time zone.
  27. TIME_ZONE = 'Europe/Moscow'
  28. # https://docs.djangoproject.com/en/dev/ref/settings/#language-code
  29. LANGUAGE_CODE = 'ru-ru'
  30. # LANGUAGE_CODE = 'en-en'
  31. # https://docs.djangoproject.com/en/dev/ref/settings/#site-id
  32. SITE_ID = 1
  33. # https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n
  34. USE_I18N = True
  35. # https://docs.djangoproject.com/en/dev/ref/settings/#use-l10n
  36. USE_L10N = True
  37. # https://docs.djangoproject.com/en/dev/ref/settings/#use-tz
  38. USE_TZ = False
  39.  
  40. # DATABASES
  41. # ------------------------------------------------------------------------------
  42. # https://docs.djangoproject.com/en/dev/ref/settings/#databases
  43. DATABASES = {
  44.     'default': {
  45.         'ENGINE': 'django.db.backends.postgresql_psycopg2',
  46.         'NAME': 'nmo',
  47.         'USER' : 'alexander',
  48.         'PASSWORD' : 'NjndJhfIhdjSljJfF',
  49.         'HOST' : '127.0.0.1',
  50.         'PORT' : '5432',
  51.     }
  52. }
  53.  
  54. DATABASES['default']['ATOMIC_REQUESTS'] = True
  55.  
  56. # URLS
  57. # ------------------------------------------------------------------------------
  58. # https://docs.djangoproject.com/en/dev/ref/settings/#root-urlconf
  59. ROOT_URLCONF = 'config.urls'
  60. # https://docs.djangoproject.com/en/dev/ref/settings/#wsgi-application
  61. WSGI_APPLICATION = 'config.wsgi.application'
  62.  
  63. USER_AGENTS_CACHE = 'default'
  64. # APPS
  65. # ------------------------------------------------------------------------------
  66. DJANGO_APPS = [
  67.     'django.contrib.contenttypes',
  68.     'django.contrib.auth',
  69.     'django.contrib.sessions',
  70.     'django.contrib.sites',
  71.     'django.contrib.messages',
  72.     'django.contrib.redirects',
  73.     'django.contrib.staticfiles',
  74.     'grappelli.dashboard',
  75.     'grappelli',
  76.     'filebrowser',
  77.     'django.contrib.admin',
  78.     'django.contrib.flatpages',
  79.     'django_extensions_shell',
  80.  
  81.  
  82.     'django_user_agents',
  83.     'django.contrib.sitemaps',
  84. ]
  85. THIRD_PARTY_APPS = [
  86.     'sortedm2m',
  87.     'crispy_forms',
  88.     'ckeditor',
  89.     'ckeditor_uploader',
  90.     'allauth',
  91.     'allauth.account',
  92.     'allauth.socialaccount',
  93.     'oauth2_provider',
  94.     'rest_framework',
  95.     'rest_framework.authtoken',
  96.     'corsheaders',
  97.     'django_otp',
  98.     'django_otp.plugins.otp_static',
  99.     'django_otp.plugins.otp_totp',
  100.     'two_factor',
  101.     'django_redis',
  102.     'dbmail',
  103.     'import_export',
  104.     'private_storage',
  105.     'widget_tweaks',
  106.     'django_crontab',
  107.     'nested_inline',
  108.     'utm_tracker',
  109.     'robokassa',
  110. ]
  111.  
  112. LOCAL_APPS = [
  113.     'users',
  114.     'events',
  115.     'stats',
  116.     'polls',
  117.     'payments',
  118.     'cycle_registartion',
  119. ]
  120. # https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
  121. INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
  122.  
  123. # MIGRATIONS
  124. # ------------------------------------------------------------------------------
  125. # https://docs.djangoproject.com/en/dev/ref/settings/#migration-modules
  126. MIGRATION_MODULES = {
  127.     'sites': 'apps.contrib.sites.migrations'
  128. }
  129.  
  130. # AUTHENTICATION
  131. # ------------------------------------------------------------------------------
  132. # https://docs.djangoproject.com/en/dev/ref/settings/#authentication-backends
  133. AUTHENTICATION_BACKENDS = [
  134.     # 'oauth2_provider.backends.OAuth2Backend',
  135.     'django.contrib.auth.backends.ModelBackend',
  136.     'allauth.account.auth_backends.AuthenticationBackend',
  137. ]
  138. # https://docs.djangoproject.com/en/dev/ref/settings/#auth-user-model
  139. AUTH_USER_MODEL = 'users.User'
  140. # https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url
  141. # LOGIN_REDIRECT_URL = 'users:redirect'
  142. # https://docs.djangoproject.com/en/dev/ref/settings/#login-url
  143. # LOGIN_URL = 'account_login'
  144.  
  145. # PASSWORDS
  146. # ------------------------------------------------------------------------------
  147. # https://docs.djangoproject.com/en/dev/ref/settings/#password-hashers
  148. PASSWORD_HASHERS = [
  149.     # https://docs.djangoproject.com/en/dev/topics/auth/passwords/#using-argon2-with-django
  150.     'django.contrib.auth.hashers.Argon2PasswordHasher',
  151.     'django.contrib.auth.hashers.PBKDF2PasswordHasher',
  152.     'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
  153.     'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
  154.     'django.contrib.auth.hashers.BCryptPasswordHasher',
  155. ]
  156. # https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators
  157. AUTH_PASSWORD_VALIDATORS = [
  158.     {
  159.         'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  160.     },
  161.     {
  162.         'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  163.     },
  164.     {
  165.         'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  166.     },
  167.     {
  168.         'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  169.     },
  170. ]
  171.  
  172. # MIDDLEWARE
  173. # ------------------------------------------------------------------------------
  174. # https://docs.djangoproject.com/en/dev/ref/settings/#middleware
  175. MIDDLEWARE = [
  176.     'corsheaders.middleware.CorsMiddleware',
  177.     'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware',
  178.     'django.middleware.security.SecurityMiddleware',
  179.     'django.contrib.sessions.middleware.SessionMiddleware',
  180.     'django.middleware.common.CommonMiddleware',
  181.     'django.middleware.csrf.CsrfViewMiddleware',
  182.     # Order of AuthenticationMiddleware vs OAuth2TokenMiddleware is important
  183.     'django.contrib.auth.middleware.AuthenticationMiddleware',
  184.     'django_otp.middleware.OTPMiddleware',
  185.     'oauth2_provider.middleware.OAuth2TokenMiddleware',
  186.     'django.contrib.messages.middleware.MessageMiddleware',
  187.     'django.middleware.clickjacking.XFrameOptionsMiddleware',
  188.     # 'debug_toolbar.middleware.DebugToolbarMiddleware',
  189.     'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
  190.     # 'apps.middleware.CustomRedirectFallbackMiddleware',
  191.     'apps.check_register_middleware.check_register',
  192.     'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
  193.     'apps.middleware.SetLastVisitMiddleware',
  194.     'utm_tracker.middleware.UtmSessionMiddleware',
  195.     'utm_tracker.middleware.LeadSourceMiddleware',
  196.  
  197.     'django_user_agents.middleware.UserAgentMiddleware',
  198. ]
  199.  
  200. CORS_ORIGIN_ALLOW_ALL = True
  201. X_FRAME_OPTIONS = 'SAMEORIGIN'
  202. # STATIC
  203. # ------------------------------------------------------------------------------
  204. # https://docs.djangoproject.com/en/dev/ref/settings/#static-root
  205. STATIC_ROOT = str(ROOT_DIR('/static/'))
  206. # # https://docs.djangoproject.com/en/dev/ref/settings/#static-url
  207. STATIC_URL = '/static/'
  208. # # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
  209. STATICFILES_DIRS = [
  210.     str(APPS_DIR.path('static')),
  211. ]
  212. # # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
  213. STATICFILES_FINDERS = [
  214.     'django.contrib.staticfiles.finders.FileSystemFinder',
  215.     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  216. ]
  217.  
  218. # # MEDIA
  219. # # ------------------------------------------------------------------------------
  220. # # https://docs.djangoproject.com/en/dev/ref/settings/#media-root
  221. MEDIA_ROOT = str(APPS_DIR('media'))
  222. # # https://docs.djangoproject.com/en/dev/ref/settings/#media-url
  223. MEDIA_URL = '/'
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231. # TEMPLATES
  232. # ------------------------------------------------------------------------------
  233. # https://docs.djangoproject.com/en/dev/ref/settings/#templates
  234. TEMPLATES = [
  235.     {
  236.         # https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
  237.         'BACKEND': 'django.template.backends.django.DjangoTemplates',
  238.         # https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
  239.         'DIRS': [
  240.             str(APPS_DIR.path('templates')),
  241.         ],
  242.         'OPTIONS': {
  243.             # https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
  244.             'debug': DEBUG,
  245.             # https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
  246.             # https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
  247.             'loaders': [
  248.             ('django.template.loaders.cached.Loader', [
  249.                 'django.template.loaders.filesystem.Loader',
  250.                 'django.template.loaders.app_directories.Loader',
  251.             ]),
  252.             ],
  253.             # https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
  254.             'context_processors': [
  255.                 'django.template.context_processors.debug',
  256.                 'django.template.context_processors.request',
  257.                 'django.contrib.auth.context_processors.auth',
  258.                 'django.template.context_processors.i18n',
  259.                 'django.template.context_processors.media',
  260.                 'django.template.context_processors.static',
  261.                 'django.template.context_processors.tz',
  262.                 'django.contrib.messages.context_processors.messages',
  263.                 # 'django.template.context_processors.request',
  264.                 'apps.context_processors.base'
  265.             ],
  266.         },
  267.     },
  268. ]
  269. # http://django-crispy-forms.readthedocs.io/en/latest/install.html#template-packs
  270. CRISPY_TEMPLATE_PACK = 'bootstrap4'
  271.  
  272. # FIXTURES
  273. # ------------------------------------------------------------------------------
  274. # https://docs.djangoproject.com/en/dev/ref/settings/#fixture-dirs
  275. FIXTURE_DIRS = (
  276.     str(APPS_DIR.path('fixtures')),
  277. )
  278.  
  279. # EMAIL
  280. # ------------------------------------------------------------------------------
  281. # https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
  282. # EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND', default='django.core.mail.backends.smtp.EmailBackend')
  283.  
  284.  
  285. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  286.  
  287. # EMAIL_HOST = 'smtp.mail.ru'
  288. # EMAIL_PORT = 587
  289. # EMAIL_HOST_USER = 'robot@aqmt.ru'
  290. # EMAIL_HOST_PASSWORD = '&yoou1iOGIO2'
  291. # EMAIL_USE_TLS = True
  292. # DEFAULT_FROM_EMAIL = 'robot@aqmt.ru'
  293.  
  294. EMAIL_HOST = 'smtp-pulse.com'
  295. EMAIL_PORT = 587
  296. EMAIL_HOST_USER = 'averin76@bk.ru'
  297. EMAIL_HOST_PASSWORD = 'ZHMRpLMHSt'
  298. EMAIL_USE_TLS = True
  299. DEFAULT_FROM_EMAIL = 'robot@aqmt.ru'
  300.  
  301. DB_MAILER_TRACK_ENABLE = True
  302. DB_MAILER_ENABLE_LOGGING = True
  303. DB_MAILER_WSGI_AUTO_RELOAD = True
  304. DB_MAILER_UWSGI_AUTO_RELOAD = True
  305.  
  306. # DB_MAILER_SMS_PROVIDER = 'providers.smssendpulse'
  307. # DB_MAILER_SMS_PROVIDER = 'providers.sms'
  308. DB_MAILER_SMS_PROVIDER = 'providers.sendpulse_automation'
  309.  
  310.  
  311.  
  312. IQSMS_API_LOGIN = "z1563484037157"
  313. IQSMS_API_PASSWORD = "879584"
  314.  
  315. IQSMS_FROM = "aqmt.ru"
  316.  
  317. BROKER_URL = 'redis://127.0.0.1:6379/5'
  318. BROKER_TRANSPORT = 'redis'
  319.  
  320. # ADMIN
  321. # ------------------------------------------------------------------------------
  322. # Django Admin URL.
  323. ADMIN_URL = 'admin'
  324. # https://docs.djangoproject.com/en/dev/ref/settings/#admins
  325. ADMINS = [
  326.     ("""AQMT admin""", 'admin@aqmt.ru'),
  327. ]
  328. # https://docs.djangoproject.com/en/dev/ref/settings/#managers
  329. MANAGERS = ADMINS
  330.  
  331.  
  332. # django-allauth
  333. # ------------------------------------------------------------------------------
  334. ACCOUNT_ALLOW_REGISTRATION = env.bool('DJANGO_ACCOUNT_ALLOW_REGISTRATION', True)
  335. # https://django-allauth.readthedocs.io/en/latest/configuration.html
  336. ACCOUNT_AUTHENTICATION_METHOD = 'username'
  337. # https://django-allauth.readthedocs.io/en/latest/configuration.html
  338. ACCOUNT_EMAIL_REQUIRED = False
  339. # https://django-allauth.readthedocs.io/en/latest/configuration.html
  340. ACCOUNT_EMAIL_VERIFICATION = 'optional'
  341. # https://django-allauth.readthedocs.io/en/latest/configuration.html
  342. ACCOUNT_ADAPTER = 'apps.users.adapters.AccountAdapter'
  343. # https://django-allauth.readthedocs.io/en/latest/configuration.html
  344. # SOCIALACCOUNT_ADAPTER = 'apps.users.adapters.SocialAccountAdapter'
  345.  
  346.  
  347. ACCOUNT_UNIQUE_EMAIL = False
  348. ACCOUNT_EMAIL_CONFIRMATION_HMAC = False
  349. ACCOUNT_CONFIRM_EMAIL_ON_GET = True
  350. # ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
  351. ACCOUNT_SMS_CONFIRMATION = True
  352.  
  353. ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = True
  354. ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = "/accounts/login/"
  355. ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = "/"
  356. ACCOUNT_USER_DISPLAY = 'apps.users.models.get_display_name'
  357.  
  358. # ACCOUNT_USERNAME_VALIDATORS = 'apps.users.models.UsernameValidator'
  359. # AUTH_USERNAME_VALIDATORS = 'apps.users.models.UsernameValidator'
  360.  
  361. ACCOUNT_FORMS = {
  362.    'signup': 'apps.users.forms.RegistrationForm',
  363.    'login': 'apps.users.forms.CustomLoginForm',
  364.    'update': 'apps.users.forms.UserUpdateForm',
  365.    'reset_password': 'apps.users.forms.CustomResetPasswordForm',
  366.    'set_password': 'apps.users.forms.CustomResetPasswordKeyForm'
  367. }
  368.  
  369.  
  370.  
  371. REST_FRAMEWORK = {
  372.     'DEFAULT_AUTHENTICATION_CLASSES': (
  373.         'rest_framework.authentication.BasicAuthentication',
  374.         'apps.users.mixins.CsrfExemptSessionAuthentication',
  375.         'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
  376.     ),
  377.     'DEFAULT_PERMISSION_CLASSES': (
  378.         'rest_framework.permissions.IsAuthenticated',
  379.     ),
  380. }
  381.  
  382.  
  383. # ############## OAUTH SETTINGS ###################
  384.  
  385. OAUTH2_PROVIDER = {
  386.     'SCOPES': {
  387.         'users': 'user details',
  388.         'read': 'Read scope',
  389.         'write': 'Write scope',
  390.         'groups': 'Access to your groups',
  391.         'introspection': 'introspection'
  392.     },
  393.     'ACCESS_TOKEN_EXPIRE_SECONDS': 86400,
  394. }
  395.  
  396. # ############## OTP SETTINGS #####################
  397.  
  398. LOGIN_URL = 'two_factor:login'
  399.  
  400. # this one is optional
  401. LOGIN_REDIRECT_URL = '/'
  402. TWO_FACTOR_CALL_GATEWAY = None
  403. TWO_FACTOR_PATCH_ADMIN = True
  404. REDIRECT_FIELD_NAME = 'next'
  405. TWO_FACTOR_SMS_GATEWAY = None
  406.  
  407. APPEND_SLASH = True
  408. # ############## FILEBROWSER SETTINGS ###############
  409.  
  410. FILEBROWSER_DIRECTORY = ''
  411. DIRECTORY = ''
  412.  
  413. FILEBROWSER_EXTENSIONS = {
  414. 'Folder': [''],
  415. 'Image': ['.jpg', '.jpf', '.jpeg', '.gif', '.png', '.tif', '.tiff'],
  416. 'Document': ['.pdf', '.doc', '.rtf', '.txt', '.xls', '.csv', '.docx'],
  417. 'Video': ['.mov', '.wmv', '.mpeg', '.mpg', '.avi', '.rm'],
  418. 'Audio': ['.mp3', '.mp4', '.wav', '.aiff', '.midi', '.m4p']
  419. }
  420.  
  421. FILEBROWSER_VERSIONS_BASEDIR = '_versions'
  422.  
  423.  
  424. FILEBROWSER_VERSIONS = {
  425. 'admin_thumbnail': { 'verbose_name': 'Admin Thumbnail', 'width': '', 'height': 100, 'opts': '' },
  426. 'medium': { 'verbose_name': 'Admin Thumbnail', 'width': 640, 'height': 430, 'opts': 'crop' },
  427. 'crop': { 'verbose_name': 'Crop', 'width': 500, 'height': 500, 'opts': 'crop',  'grayscale': True },
  428. 'large': {'verbose_name': 'Large', 'width': 1080, 'height': '', 'opts': ''},
  429. 'banner': { 'verbose_name': 'Admin Thumbnail', 'width': 640, 'height': 430, 'opts': 'crop' },
  430. 'lector_image_slider': { 'verbose_name': 'Admin Thumbnail', 'width': 287, 'height': 358, },
  431. 'large_crop': { 'verbose_name': 'Medium', 'width': 1280, 'height': '720', 'opts': 'crop', 'grayscale': False },
  432. 'billboard_home' :  { 'verbose_name': 'Medium', 'width': 2048, 'height': '690', 'opts': 'crop', 'grayscale': False },
  433. 'doc_image' : { 'verbose_name': 'Medium', 'width': 230, 'height': '292', 'opts': 'crop', 'grayscale': False },
  434. 'doc_image_hirizontal' : { 'verbose_name': 'Medium', 'width': 376, 'height': '233', 'opts': 'crop', 'grayscale': False },
  435. # 'billboard_banner' :  { 'verbose_name': 'Medium', 'width': 1440, 'height': '740', 'opts': 'crop', 'grayscale': False },
  436.  
  437. }
  438.  
  439. FILEBROWSER_ADMIN_VERSIONS = [ 'medium', 'large', 'crop' ]
  440.  
  441. FILEBROWSER_ADMIN_THUMBNAIL = 'admin_thumbnail'
  442.  
  443. FILEBROWSER_SELECT_FORMATS = {
  444. 'file': ['Folder','Image','Document','Video','Audio'],
  445. 'image': ['Image'],
  446. 'document': ['Document'],
  447. 'media': ['Video','Audio'],
  448. }
  449.  
  450. FILEBROWSER_OVERWRITE_EXISTING = False
  451.  
  452. CKEDITOR_UPLOAD_PATH = "uploads/cke/"
  453.  
  454. # ##############GRAPPELLI SETTINGS ###################
  455. GRAPPELLI_INDEX_DASHBOARD = 'apps.dashboard.CustomIndexDashboard'
  456. GRAPPELLI_ADMIN_TITLE = 'Качественные медицинские технологии (AQMT)'
  457.  
  458.  
  459.  
  460. #############  CELERY SETTINGS ########################
  461.  
  462.  
  463. # import djcelery
  464. # djcelery.setup_loader()
  465.  
  466.  
  467. #############  CKEDITOR SETTINGS ########################
  468.  
  469. CKEDITOR_CONFIGS = {
  470.     'default': {
  471.         'toolbar': 'full',
  472.         'width': '100%',
  473.         'enterMode': 2,
  474.     },
  475. }
  476.  
  477. ############# PRIVAT FILES #####################
  478. PRIVATE_STORAGE_ROOT = str(APPS_DIR('private-media/'))
  479. # PRIVATE_STORAGE_AUTH_FUNCTION = 'private_storage.permissions.allow_staff'
  480. PRIVATE_STORAGE_AUTH_FUNCTION = 'apps.users.perms.allow_staff_and_owner'
  481. PRIVATE_STORAGE_SERVER = 'nginx'
  482. PRIVATE_STORAGE_INTERNAL_URL = '/private-x-accel-redirect/'
  483.  
  484.  
  485. ############# ROBOKASSA #####################
  486.  
  487. ROBOKASSA_LOGIN = "aqmt"
  488. # ROBOKASSA_PASSWORD1 = "PyO3xBBaTTf3nBDK86R7"
  489. # ROBOKASSA_PASSWORD2 = "aehGQ98PlPDh66sZ4fKa" #- пароль №2. Его можно не указывать, если django-robokassa используется только для вывода формы платежа. Если django-robokassa используется для приема платежей, то этот параметр обязательный.
  490.  
  491. ############# TEST #####################
  492. ROBOKASSA_PASSWORD1 = "Txxp34CB7e4cCLmlQIE0"
  493. ROBOKASSA_PASSWORD2 = "Kl70Q9jF1dpKZrS5gsnr" #- пароль №2. Его можно не указывать, если django-robokassa используется только для вывода формы платежа. Если django-robokassa используется для приема платежей, то этот параметр обязательный.
  494. ############# TEST #####################
  495.  
  496.  
  497. # ROBOKASSA_USE_POST = "" #- используется ли метод POST при приеме результатов от ROBOKASSA. По умолчанию - True. Считается, что для Result URL, Success URL и Fail URL выбран один и тот же метод.
  498. ROBOKASSA_STRICT_CHECK = True #- использовать ли строгую проверку (требовать предварительного уведомления на ResultURL). По умолчанию - True.
  499. ROBOKASSA_TEST_MODE = True # включен ли тестовый режим. По умолчанию False (т.е. включен боевой режим).
  500. ROBOKASSA_EXTRA_PARAMS = [] #- список (list) названий дополнительных параметров, которые будут передаваться вместе с запросами. "Shp" к ним приписывать не нужно.
  501. # ROBOKASSA_TEST_FORM_TARGET = "" #- url робокассы для тестового режима. Настройка предназначена для случая, когда в распоряжении не имеется доступного в интернете домена (например разработка на localhost) и вместо сервера робокассы необходимо использовать свой.
  502.  
  503.  
  504. REST_API_ID = '475e5b5d65b0c44da9a3d1410cd0834d'
  505. REST_API_SECRET = 'ef01c11c930250401572aa1189e98403'
  506.  
  507.  
  508. ############# MEMCACHED #####################
  509.  
  510.  
  511. TOKEN_STORAGE = 'memcached'
  512. MEMCACHED_HOST = '127.0.0.1:11211'
  513.  
  514.  
  515. ############# SENDPULSE Automation360 #####################
  516.  
  517. SMS_LIVE_NOTIFICATION_URL = "https://events.sendpulse.com/events/id/ce3484582d1045d18e8d3124523eb699/7624137"
  518. SMS_POLL_URL = "https://events.sendpulse.com/events/id/91576f417bdc4746d1a41dfbf8667cac/7624137"
  519. SMS_PASSWD_URL = "https://events.sendpulse.com/events/id/9c515992d6a84116d28fd5a949e432fe/7624137"
  520. SMS_CONFIRM_URL = "https://events.sendpulse.com/events/id/5a63d4d5064b405dcd82cd3224902026/7624137"
  521. SMS_PASSWORD_RESET_URL = "https://events.sendpulse.com/events/id/4f7c3ba21dac498fb24827f21fd167f8/7624137"
  522. SMS_BILET_URL = "https://events.sendpulse.com/events/id/fcbcdcc2e28d4428d8c1ef105d208764/7624137"
  523. SMS_BILET_CONGRESS_URL = "https://events.sendpulse.com/events/id/77161bfa2d794f5ed3c223bc9c20356c/7624137"
  524.  
  525. USER_REGISTERED_SITE_URL = "https://events.sendpulse.com/events/id/96dd84d566f94843ac99391b0ff8c522/7624137"
  526. # {
  527. #   "email": "bak@acnaucer.ru",
  528. #   "phone": "+123456789",
  529. #   "user_id": 123,
  530. #   "is_lec_reg": "is_lec_reg value"
  531. # }
  532. USER_REGISTERED_ONLINE_URL = "https://events.sendpulse.com/events/id/c8972bc47c6e4cdeb9e358e2a00fb12a/7624137"
  533. # {
  534. #   "email": "bak@acnaucer.ru",
  535. #   "phone": "+123456789",
  536. #   "user_id": 123,
  537. #   "eventId": 123,
  538. #   "event_name": "event_name value",
  539. #   "event_date": "event_date value"
  540. # }
  541. USER_REGISTERED_OFFLINE_URL = "https://events.sendpulse.com/events/id/dd991317ab6946d5a8669726068c4d9f/7624137"
  542. # {
  543. #   "email": "bak@acnaucer.ru",
  544. #   "phone": "+123456789",
  545. #   "user_id": 123,
  546. #   "event_date": "2021-06-15",
  547. #   "event_name": "event_name value",
  548. #   "eventId": 123
  549. # }
  550. USER_REGISTERED_CYCLE_URL = "https://events.sendpulse.com/events/id/96aafb5efc09479acfbc83023dd557d3/7624137"
  551. # {
  552. #   "email": "bak@acnaucer.ru",
  553. #   "phone": "+123456789",
  554. #   "user_id": 123,
  555. #   "event_date": "2021-06-15",
  556. #   "eventId": "eventId value",
  557. #   "event_name": "event_name value"
  558. # }
  559. USER_REGISTERED_CONGRESS_URL = "https://events.sendpulse.com/events/id/4650bc8220cf4826e319120d752a130d/7624137"
  560. # {
  561. #   "email": "bak@acnaucer.ru",
  562. #   "phone": "+123456789",
  563. #   "user_id": 123,
  564. #   "event_date": "2021-06-15",
  565. #   "event_name": "event_name value",
  566. #   "eventId": 123
  567. # }
  568. # USER_REGISTERED_CONGRESS_OFFLINE_URL = "https://events.sendpulse.com/events/id/96aafb5efc09479acfbc83023dd557d3/7624137"
  569.  
  570.  
  571.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement