Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Django settings for AtsERP project.
- Generated by 'django-admin startproject' using Django 3.0.8.
- For more information on this file, see
- https://docs.djangoproject.com/en/3.0/topics/settings/
- For the full list of settings and their values, see
- https://docs.djangoproject.com/en/3.0/ref/settings/
- """
- import os
- # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
- BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- # Quick-start development settings - unsuitable for production
- # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
- # SECURITY WARNING: keep the secret key used in production secret!
- SECRET_KEY = '!h#=tt#%_0ih1c_^9#k%#e5tdjk*b1j3t6tn5pe$w_-ay9!a70'
- # SECURITY WARNING: don't run with debug turned on in production!
- DEBUG = True
- ALLOWED_HOSTS = ['synapsys.adityatrading.in','synapsys.adityatrading.com','192.168.10.41',' 10.212.134.201','ipo.adityatrading.in','trading.adityatrading.in','synapses.adityatrading.in','axon.adityatrading.in','180.179.67.8', 'localhost']
- # MODE = "SERVER"
- MODE = "LOCAL"
- if MODE == "SERVER":
- FILE_SPLIT = "/"
- else:
- FILE_SPLIT = "\\"
- # Application definition
- INSTALLED_APPS = [
- 'dal',
- 'dal_select2',
- 'whitenoise.runserver_nostatic',
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'django_extensions',
- 'django_filters',
- 'AtsERP.atserp_base',
- 'import_export',
- 'AtsERP.atserp_base.atserp_workflow.activflow.core',
- 'AtsERP.atserp_base.atserp_workflow.activflow',
- 'AtsERP.atserp_base.atserp_workflow',
- 'rest_framework',
- 'rest_framework.authtoken',
- 'drf_multiple_model',
- 'corsheaders',
- 'django_admin_inline_paginator',
- ]
- MIDDLEWARE = [
- 'django.middleware.security.SecurityMiddleware',
- 'whitenoise.middleware.WhiteNoiseMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'corsheaders.middleware.CorsMiddleware',
- 'django.middleware.common.CommonMiddleware',
- # 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.middleware.http.ConditionalGetMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
- ]
- ROOT_URLCONF = 'AtsERP.urls'
- LOGIN_URL = '/admin/login/'
- LOGIN_REDIRECT_URL = '/dashboard/'
- LOGOUT_REDIRECT_URL = '/admin/login/'
- TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [os.path.join(BASE_DIR, 'AtsERP/atserp_base/templates')],
- 'APP_DIRS': True,
- 'OPTIONS': {
- 'context_processors': [
- 'django.template.context_processors.i18n',
- 'django.template.context_processors.media',
- 'django.template.context_processors.static',
- 'django.template.context_processors.tz',
- 'django.template.context_processors.debug',
- 'django.template.context_processors.request',
- 'django.contrib.auth.context_processors.auth',
- 'django.contrib.messages.context_processors.messages',
- 'AtsERP.atserp_base.atserp_workflow.activflow.core.processors.global_context',
- 'AtsERP.atserp_base.atserp_processors.atserp_request_processor.get_org_units',
- ],
- },
- },
- ]
- WSGI_APPLICATION = 'AtsERP.wsgi.application'
- LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'formatters': {
- 'console': {
- 'format': '%(name)-12s %(levelname)-8s %(message)s'
- },
- 'verbose': {
- 'format': '%(asctime)s %(filename)-12s:%(lineno)s-%(funcName)20s() :: %(message)s'
- }
- },
- 'handlers': {
- 'logfile': {
- 'level': 'DEBUG',
- 'class': 'logging.FileHandler',
- 'filename': os.path.join(BASE_DIR, 'log/debug.log'),
- 'formatter': 'verbose',
- 'mode':'w',
- }
- },
- 'loggers': {
- 'atslog': {
- 'handlers': ['logfile'],
- 'level': 'DEBUG',
- 'propagate': True,
- }
- }
- }
- CORS_ORIGIN_ALLOW_ALL = True
- CORS_ORIGIN_WHITELIST = (
- 'http://localhost:8081','https://testupi.adityatrading.in','https://axon.adityatrading.in',
- )
- REST_FRAMEWORK = {
- 'DEFAULT_AUTHENTICATION_CLASSES': [
- 'rest_framework.authentication.TokenAuthentication',
- ],
- }
- # Database
- # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
- # if os.getenv('GAE_APPLICATION', None):
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.postgresql_psycopg2',
- 'NAME': 'atserptestdb170724',
- 'USER': 'postgres',
- 'PASSWORD': 'ats123456',
- # https://console.cloud.google.com/sql/instances
- # 'HOST': '/cloudsql/atserp-01:us-central1:pgatserp-01',
- # 'HOST': '35.238.51.157',
- 'HOST':'192.168.10.11',
- 'PORT': '5432', #at the moment of this writing google cloud postgresql is using the default postgresql port 5432
- # 'OPTIONS': {
- # 'sslmode': 'verify-ca', #leave this line intact
- # 'sslrootcert': '/your/path/to/server-ca.pem',
- # "sslcert": "/your/path/to/client-cert.pem",
- # "sslkey": "/your/path/to/client-key.pem",
- # }
- }
- }
- # else:
- # DATABASES = {
- # 'default': {
- # 'ENGINE': 'django.db.backends.postgresql_psycopg2',
- # 'NAME': 'AtsERP_DB_03',
- # 'USER': 'postgres',
- # 'PASSWORD': 'synapses',
- # 'HOST': 'localhost',
- # 'PORT': '5432',
- # }
- # }
- # DATABASES = {
- # 'default': {
- # 'ENGINE': 'django.db.backends.sqlite3',
- # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- # }
- # }
- # Password validation
- # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
- AUTH_PASSWORD_VALIDATORS = [
- {
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
- },
- ]
- # Internationalization
- # https://docs.djangoproject.com/en/3.0/topics/i18n/
- # LANGUAGE_CODE = 'en-us'
- # TIME_ZONE = 'UTC'
- # USE_I18N = True
- # USE_L10N = True
- # USE_TZ = True
- LANGUAGE_CODE = 'en-us'
- TIME_ZONE = 'Asia/Kolkata'
- USE_I18N = False
- USE_L10N = False
- # Static files (CSS, JavaScript, Images)
- # https://docs.djangoproject.com/en/3.0/howto/static-files/
- CDAS_MOCK_URL_AUTH = 'http://mockweb.cdslindia.com/AuthWeb/api/CDASAuthorization/APIAuth'
- CDAS_MOCK_URL_BOSETUP = 'http://mockweb.cdslindia.com/Commonweb/api/BOAPI/BOSetup'
- CDAS_DP_ID = '74300'
- CDAS_USER_ID = 'APIADMIN1'
- CDAS_OPERATOR_ID = 'ADMIN'
- CDAS_PASSWORD = 'CDsl12##'
- CDAS_AES_KEY = 'ef0v8js22mhszfirrmis4dnznaoxayke'
- CDAS_ENC_PASS = 'CkSG3nGaEzk4DhIeshMl9w=='
- CDAS_AUTH_SIGN = 'tUQ5WWqiyNroZqGJpKYCZR9DxSM0bwQpuD17V6cm+DyTCFmptgcWs0KRq6Q0guS/xvjJHcmcLI1gZNKYU8dZpy9Pye+lfJw07qJLF/0hvWs='
- CDAS_AUTH_TYPE = 'Basic Og=='
- CDAS_CONTENT_TYPE = 'application/json'
- STATIC_ROOT = os.path.abspath(os.path.join(BASE_DIR, 'AtsERP/', 'static'))
- STATIC_URL = '/static/'
- MEDIA_URL='/media/'
- MEDIA_ROOT = os.path.abspath(os.path.join(BASE_DIR, 'AtsERP/', 'media'))
- # MEDIA_ROOT = os.path.join(BASE_DIR,'media')
- ZERP_UI_OPTION = 'ZERP_UI_DEFAULT'
- DATE_INPUT_FORMATS = ['%d-%m-%Y', '%Y-%m-%d', '%d %b %Y HH:MM:SS']
- BROKER_URL = 'redis://localhost:6379'
- CELERY_RESULT_BACKEND = 'redis://localhost:6379'
- CELERY_ACCEPT_CONTENT = ['application/json']
- CELERY_TASK_SERIALIZER = 'json'
- CELERY_RESULT_SERIALIZER = 'json'
- CELERY_TIMEZONE = 'Asia/Dhaka'
- # DEFAULT_FILE_STORAGE = 'db_file_storage.storage.DatabaseFileStorage'
- """CKYC CREDS"""
- CKYC_INSTITUTION_CODE = 'IN1954'
- CKYC_REGION_CODE = 'BLR'
- CKYC_BRANCH_CODE = 'KA01'
- CKYC_USER_ID = 'IA004226'
- CKYC_USER_ID_1 = 'IA003968'
- EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
- # EMAIL_HOST = 'smtp.gmail.com'
- # EMAIL_USE_TLS = True
- # EMAIL_PORT = 587
- # EMAIL_HOST_USER = 'info@adityatrading.com'
- # EMAIL_HOST_PASSWORD = 'Ats#2021'
- #changed 04/07/2023
- EMAIL_HOST = "smtpcorp.netcore.co.in"
- EMAIL_USE_TLS = True
- EMAIL_USE_SSL = False
- EMAIL_PORT = 587
- EMAIL_HOST_USER = 'info@adityatrading.com'
- EMAIL_HOST_PASSWORD = '@At$3579#'
- IPO_URL = 'https://ipo.adityatrading.in/addClientDetails/'
- XTS_URL = 'https://trading.adityatrading.in/backofficeapi/createinvestorclient/'
- API_CONTENT_TYPE = 'application/json'
- LIVE_URL = MEDIA_ROOT
- DATA_UPLOAD_MAX_NUMBER_FIELDS = None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement