Properties of the local_settings.py file
Several IBM MobileFirst Quality Assurance operating properties are defined in the local_settings.py file.
Properties
Many of the values for the required and optional properties are set in the settings.py file. You might want to change the value of these settings from what is listed in the settings.py file. You cannot update the settings.py file, but you can override the values in the settings.py file by adding the new settings to the local_settings.py. The local_settings.py file is not replaced when MobileFirst Quality Assurance is updated, but the settings.py file is.
For properties, it is not necessary to set their value in the local_settings.py file unless you want to override their default values.
Property | Description | Default value | Required or optional |
---|---|---|---|
ALLOWED_HOSTS | Host name or IP address from BASE_URL. The value must match the VM’s fully qualified host name to start the MobileFirst Quality Assurance Python application. | [ "*", "127.0.0.1" ] | Required |
BASE_URL | Protocol and host name (or IP address) of the VM. If this property is set incorrectly, hyper links such as in emails that are sent by the product might be wrong. | "https://yourcompany.com" | Required |
BTS_AMPQ_URL | The hostname or IP address of the bug tracking service Docker image. | Disabled. "IP addr or hostname of BTS service" # OPTIONAL | Required if you are integrating with an external bug-tracking system. Optional if you are not. |
BTS_CONFIGURED | Specifies whether bug tracking service is configured. | True # OPTIONAL | Required to be set to True if you are integrating with an external bug tracking system. Should be set to False, if not. |
BUAPS_BASE_URL | Specifies the URL for the build upload server. | "https://yourcompany:9443/api/v1" Note: This setting must be updated with your server information. | Required |
DATABASES | Configuration of connections with databases.
The default value configures MobileFirst Quality Assurance to use the PostgreSQL
database that is provided within the VM. Modify this value only if
you must use some other database. Note: Django supports connections
to multiple databases; however, MobileFirst Quality Assurance does not. To
use a different database from PostgreSQL on the VM, then specify only
one (‘default’ : …) entry.
|
Defined in the settings.py file. | Optional |
EMAIL_FROM_NAME | Name of the user from which the application sends emails | 'Your Company <{0}>'.format (EMAIL_HOST_USER) | Required |
EMAIL_HOST | Host name of email provider. | 'localhost' | Required |
EMAIL_HOST_PASSWORD | Password for the default email address of the server. | '' | Required |
EMAIL_HOST_USER | The email address of the server. | 'no-reply@yourcompany' | Required |
EMAIL_PORT | Host port of email provider (for example, 25 or 587). If any EMAIL_* properties are set incorrectly, emails that are sent by the product might be wrong, or might not be sent. | 25 | Required |
EMAIL_USE_TLS | Specifies if MobileFirst Quality Assurance uses a secure connection between the MobileFirst Quality Assurance server and its SMTP host (email server). | False | Required |
SECRET_KEY | 50-character randomly generated string. Note: The
key is required to start the MobileFirst Quality Assurance application.
The string itself is meaningless and can be generated in any manner, such as by using the MiniWebTools’ Django Secret Key Generator. After you generate the key, keep it confidential. |
Note: There is a default key in the settings.py file.
However, do not use or rely on this default key.
|
Required |
STORAGE_SERVICE_URL | Specifies the URL for the storage server. | "https://yourcompany:9443/api/v1" Note: This setting must be updated with your server information. If modified, it must retain the closing :9443/api/v1. | Required |
VALIDATE_TOKENS | When you are using the Token Licensing feature, this setting must be set to True for MobileFirst Quality Assurance to use the license tokens. | False | Required |
The default local_settings.py file
The following text is the contents of the local_settings.py file that is provided in the VM image. The values that are shown are examples or templates only. Review and update each of these values, and set any additional optional properties.ALLOWED_HOSTS = [
"*",
"127.0.0.1"
]
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25
EMAIL_HOST_USER = 'no-reply@yourcompany'
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = False
EMAIL_FROM_NAME = 'Your Company <{0}>'.format(EMAIL_HOST_USER)
BASE_URL = "https://yourcompany"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'apphance',
'USER': 'apphance',
'PASSWORD': 'apphance',
'HOST': '',
'PORT': '',
'CONN_MAX_AGE': None,
'ATOMIC_REQUESTS': True,
}
}
VALIDATE_TOKENS = False
#BTS_AMQP_URL = "IP addr or hostname of BTS service" # OPTIONAL
#BTS_CONFIGURED = True # OPTIONAL
BUAPS_BASE_URL = "https://yourcompany:9443/api/v1"
STORAGE_SERVICE_URL = "https://yourcompany:9443/api/v1"
BUAPS_STORAGE_BASE = BUAPS_BASE_URL + "/storage/"