| """ |
| Override default Django settings for a particular instance. |
| |
| Copy this file to settings_local.py and modify as appropriate. This file will |
| be imported into settings.py last of all so settings in this file override any |
| defaults specified in settings.py. |
| """ |
| |
| 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__))) |
| |
| # Django - general settings |
| # Uncomment and specify for production deployments |
| # DEBUG = False |
| # STATIC_ROOT = "/var/www/path/to/sitename/static/" |
| # ALLOWED_HOSTS = ['production.hostname'] |
| |
| # Django - Email settings |
| # Uncomment and specify the following for sending emails (default email backend |
| # just prints to the console) |
| # EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' |
| # EMAIL_HOST = '...' |
| # EMAIL_PORT = '...' |
| # EMAIL_HOST_USER = '...' |
| # EMAIL_HOST_PASSWORD = '...' |
| # EMAIL_USE_TLS = True |
| ADMINS = [('Admin Name', 'admin@example.com')] |
| # PORTAL_ADMINS receive administrative emails, like when a new user is created |
| # This can be set to a different value than ADMINS so that the PORTAL_ADMINS |
| # don't receive error emails |
| PORTAL_ADMINS = ADMINS |
| # SERVER_EMAIL = 'portal@example.com' |
| |
| # Keycloak Configuration |
| KEYCLOAK_CLIENT_ID = 'pga' |
| KEYCLOAK_CLIENT_SECRET = '9790c8c4-7d9b-4ccc-a820-ca5aac38d2ad' |
| KEYCLOAK_AUTHORIZE_URL = 'https://airavata.host:8443/auth/realms/default/protocol/openid-connect/auth' |
| KEYCLOAK_TOKEN_URL = 'https://airavata.host:8443/auth/realms/default/protocol/openid-connect/token' |
| KEYCLOAK_USERINFO_URL = 'https://airavata.host:8443/auth/realms/default/protocol/openid-connect/userinfo' |
| KEYCLOAK_LOGOUT_URL = 'https://airavata.host:8443/auth/realms/default/protocol/openid-connect/logout' |
| # Optional: specify if using self-signed certificate or certificate from unrecognized CA |
| # KEYCLOAK_CA_CERTFILE = os.path.join(BASE_DIR, "django_airavata", "resources", "incommon_rsa_server_ca.pem") |
| KEYCLOAK_VERIFY_SSL = False |
| |
| AUTHENTICATION_OPTIONS = { |
| # Control whether username/password authentication is allowed |
| 'password': { |
| 'name': 'your account', |
| }, |
| # Can have multiple external logins |
| # 'external': [ |
| # { |
| # 'idp_alias': 'cilogon', |
| # 'name': 'CILogon', |
| # } |
| # ] |
| } |
| |
| # Airavata API Configuration |
| GATEWAY_ID = 'default' |
| AIRAVATA_API_HOST = 'localhost' |
| AIRAVATA_API_PORT = 9930 |
| AIRAVATA_API_SECURE = True |
| FILE_UPLOAD_TEMP_DIR = '/tmp' |
| |
| USER_STORAGES = { |
| 'default': { |
| 'BACKEND': 'airavata_django_portal_sdk.user_storage.backends.DjangoFileSystemProvider', |
| 'STORAGE_RESOURCE_ID': 'airavata.host_77116e91-f042-4d3a-ab9c-3e7b4ebcd5bd', |
| 'OPTIONS': { |
| 'directory': '/tmp', |
| } |
| } |
| } |
| |
| # Profile Service Configuration |
| PROFILE_SERVICE_HOST = AIRAVATA_API_HOST |
| PROFILE_SERVICE_PORT = 8962 |
| PROFILE_SERVICE_SECURE = False |
| |
| # Portal settings |
| PORTAL_TITLE = 'Django Airavata Gateway' |
| |
| # Logging configuration |
| LOGGING = { |
| 'version': 1, |
| 'disable_existing_loggers': False, |
| 'formatters': { |
| 'verbose': { |
| 'format': '[%(asctime)s %(name)s:%(lineno)d %(levelname)s] %(message)s' |
| }, |
| }, |
| 'filters': { |
| 'require_debug_true': { |
| '()': 'django.utils.log.RequireDebugTrue', |
| }, |
| }, |
| 'handlers': { |
| 'console': { |
| 'filters': ['require_debug_true'], |
| 'class': 'logging.StreamHandler', |
| 'formatter': 'verbose', |
| 'level': 'DEBUG', |
| }, |
| 'file': { |
| 'class': 'logging.FileHandler', |
| 'filename': 'django_airavata.log', |
| 'formatter': 'verbose', |
| }, |
| }, |
| 'loggers': { |
| 'django': { |
| 'handlers': ['console', 'file'], |
| 'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'), |
| }, |
| 'airavata': { |
| 'handlers': ['console', 'file'], |
| 'level': 'DEBUG', |
| }, |
| 'django_airavata': { |
| 'handlers': ['console', 'file'], |
| 'level': 'DEBUG', |
| }, |
| }, |
| } |