This document lists all the available settings for CDCS core applications. Additional settings can be used to configure other Django packages used in the CDCS, such as:
- Django Settings,
- 3rd party packages settings (DRF, django-defender,...)
Default: "http://localhost:8000"
URI of the web server.
Default: "Local"
Name of the local CDCS instance.
Default: "0.0.0"
Version number of the project.
Settings for extra database configuration. This is a complement and not a substitute for Django database settings.
MongoDB
These settings should be set when using MongoDB for data indexing and/or GridFS for file storage.
Default: "localhost"
MongoDB host.
Default: "27017"
MongoDB port.
Default: ""
MongoDB user.
Default: ""
MongoDB password.
Default: cdcs
MongoDB database.
Default: False
If True
, MongoDB will be used for data indexing and queries will be executed against MongoDB by default.
Default: True
Save data in MongoDB asynchronously.
Default: False
Set to True
to use GridFS for file storage.
Default: {}
File Storage by model.
Example:
from django.core.files.storage import default_storage
{
'data': default_storage,
'template': default_storage,
'xsl_transformation': default_storage,
'blob': 'core_main_app.utils.storage.gridfs_storage.GridFSStorage',
'exported_compressed_files': 'core_main_app.utils.storage.gridfs_storage.GridFSStorage',
}
📄
GRIDFS_STORAGE
needs to be set toTrue
to be able to use it here.
⚠️ Please read Django notes regarding user-uploaded content and additional security topics when choosing the default file system storage.
Default: None
Checksum algorithm used for uploaded files. Choose from: None, "MD5", "SHA1", "SHA256", "SHA512".
Default: False
Can anonymous users (not logged in) access public document.
Default: True
Can users switch private workspaces to public.
Default: True
Set to True
if public data can be unpublished.
Default: False
Verify that data returned by a query can be accessed.
CDCS queries are prepared to only return data that the user can access.
If True
, the list of returned data will also be checked. This extra check can be slow.
Queries
Default: 10
Number of records to display per page.
Default: []
Example:
DATA_SOURCES_EXPLORE_APPS = [
'core_explore_federated_search_app',
'core_explore_oaipmh_app',
]
📄 Applications added to this list need to be properly installed and configured.
Default: True
Set to True
to execute queries on the local instance by default (without explicitly selecting it).
Default: 7
Number of days after which temporary queries object are removed from database.
Default: VISIBILITY_PUBLIC
Set to VISIBILITY_PUBLIC
to return only public data in exploration apps.
📄 This setting is used by registry projects. Data repositories on the other hand, return all accessible data to a user by default.
Default:
[
{"field": "title", "display": "Title"},
{"field": "last_modification_date", "display": "Last modification date"},
{"field": "template", "display": "Template"},
]
Sorting fields displayed on the search pages.
Default: False
Set the default value for the toggle component that controls the display of the modification date of each record on the search page.
Default: False
Set to True
to display an edit button next to each record the user is allowed to edit,
directly on the search page.
Default: "single"
Result sorting display type. Choose between single criteria ("single"
) or multiple criteria ("multi"
) sorting.
Default: []
List of additional resources (html/css/js) to load on the exploration page.
📄 This option can be used to modify or add components on the exploration page, without overriding the existing templates.
Default: []
Default sorting fields for the data. All the field must be prefixed by "+" or "-" (ascending or descending order)
Example:
DATA_SORTING_FIELDS = ["-title", "+last_modification_date"]
Default: None
Set to an integer to limit the number of array elements to index.
Export
Default: "exporter_compressed_files"
Name of folder used to store compressed files generated by exporters.
Default: 10
Number of seconds after which exported files are deleted.
Default: "RESULTS_PER_PAGE"
Customize the number of forms displayed per page
Default: "RESULTS_PER_PAGE"
Customize the number of records displayed per page
Default: "RESULTS_PER_PAGE"
Customize the number of files displayed per page
Default: "RESULTS_PER_PAGE"
Customize the number of queries displayed per page
Default: "yellow"
Color of the admin dashboard. black, black-light, blue, blue-light, green, green-light, purple, purple-light, red, red-light, yellow, yellow-light.
Default: False
Set to True
to show the NIST headers and footers on all pages.
Default: "Curator"
label for the data curation app menu.
Default: "Query by Example"
label for the explore by example app menu.
Default: "Query by Keyword"
label for the explore by keyword app menu.
Default: "Monaco"
Customize the type of editor used within the app. Choose between None and "Monaco" and other third-party text editors:
- 'None' to use the simple text editor with minimal features.
- 'Monaco' to use Monaco editor for advanced code editing capabilities.
- Set parameter to the name of the desired third-party text editor to integrate.
Default: "xml_schemas"
Name of the media folder where XML schemas are uploaded to.
Default: "xslt"
Name of the media folder where XML schemas are uploaded to.
Default: "core_main_app/common/xsl/xml2html.xsl"
Path to default XSLT to render data.
Default: True
Generate minimal version of the XML tree (elements with minOccurs=0
are not generated, but can be added later).
Default: False
Set to True
to generate XML tree without UI modules.
Default: True
Set to True
to allow collapsing sections of the XML Tree.
Default: False
Set to True
to add the base type of an extension and render it alone without extensions.
Default: False
Set to True
to allow parser download imports.
Default: 10000
Maximum number of in-memory elements to be generated during the parsing of an XML document. An error is raised when the limit is reached.
Default: 128 * 1024
Maximum size of XML documents being edited in the browser (in bytes).
Default: None
XSD URI Resolver for lxml validation. Choose from: None, "REQUESTS_RESOLVER" (pass user information from the request to CDCS apis).
Default: False
force_list parameter for xmltodict.parse function (used for XML to JSON conversion). Choose between a boolean, a list of elements to convert to list or a callable:
- boolean: convert or not xml elements to list,
- list: list of xml element that need to be converted to a list,
- callable: for other custom force_list behavior.
Default: "NUMERIC"
postprocessor parameter for xmltodict.parse function (used for XML to JSON conversion). Choose between 'NUMERIC' and 'NUMERIC_AND_STRING' or a callable.
- 'NUMERIC' convert numeric values from the xml document to integer or float,
- 'NUMERIC_AND_STRING' convert numeric values and also store string representation,
- callable for other custom xml post processing.
Default: "module"
Name of the XML tag used to store module information.
Default: True
Set to True
to auto escape of the XML predefined entities when saving data.
Default: True
Set to True
to display a warning when XML predefined entities are found in the data entry form.
Default: "core_explore_keyword_registry_app/xsl"
Path to folder containing XSLT files used for the initialisation.
Default: "registry-list.xsl"
Name of XSLT file used to render a page of search results (loaded during initialisation).
Default: "registry-detail.xsl"
Name of XSLT file used to render a single record (loaded during initialisation).
Default: "core_main_registry_app/xsd/res-md.xsd"
Path to the resource template (loaded during initialisation).
Default: ""
Name of the resource template (loaded during initialisation).
Default: "core_user_registration_app/user/xsd/user.xsd"
Path to the user registration template (loaded during initialisation).
Default: "user.xsd"
Name of the user registration template (loaded during initialisation).
Default: "core_main_registry_app/json/custom_registry.json"
Path to custom registry configuration file (loaded during initialisation).
Default: False
Set to True
to enable blob api and user views for blob management.
Default: 20
Length of the unique local id to be stored in resource data.
📄 This setting is only useful when not using the persistent identifiers.
Default: False
Allow the upload of more than one schema in the registry.
Default: False
Set to True
to enable harvesting by default.
Default: 60
Harvesting rate in seconds.
Default: False
Set to True
to enable the django-allauth
package.
Install the required packages core-main-app[allauth]
to do so.
Default: False
Set to True
to enable SAML2 SSO Authentication.
If ENABLE_ALLAUTH is True
, SAML2 will be done with django-allauth
,
Otherwise, SAML2 will be done with djangosaml2
.
Default: False
Set to True
to enable local MFA using django-allauth
.
Default: True
Set to True
to force users making account requests on the system
(and prevent them from being able to log in before an administrator
approves the account request).
Default: False
Set to True
to allow authentication using a matching email address
from a trusted Identity Provider.
Default: False
Set to True
to ensure email address(es) retrieved from the provider are to be
interpreted as verified. Can be set to a list of accepted domains:
Example:
SAML_VERIFIED_EMAIL=example.com,test.example.com
Default: localhost
The host to use for sending email. https://docs.djangoproject.com/en/4.2/ref/settings/#email-host
Default: 25
Port to use for the SMTP server defined in EMAIL_HOST. https://docs.djangoproject.com/en/4.2/ref/settings/#email-port
Default: webmaster@localhost
Default email address to use for various automated correspondence from the site manager(s). This doesn’t include error messages sent to ADMINS and MANAGERS; for that, see SERVER_EMAIL. https://docs.djangoproject.com/en/4.2/ref/settings/#default-from-email
Default: [CURATOR]
Subject-line prefix for email messages. https://docs.djangoproject.com/en/4.2/ref/settings/#email-subject-prefix
Default: root@localhost
The email address that error messages come from, such as those sent to ADMINS and MANAGERS. https://docs.djangoproject.com/en/4.2/ref/settings/#server-email
Default: []
A list of all the people who get code error notifications. https://docs.djangoproject.com/en/4.2/ref/settings/#admins
Default: []
A list of all the people that should get broken link notifications https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-MANAGERS
Default: []
A list of all the people who get notified when contact messages, or account requests are sent via the application.
Example:
WEBSITE_CONTACTS = [("John", "john@example.com"), ("Mary", "mary@example.com")]
Default: "False"
Set to True
to send emails asynchronously.
Default: False
Set to True
to email the website contacts when a contact message is received.
Default: False
Set to True
to email the person who requested an account when the account request is accepted.
Default: False
Set to True
to email the person who requested an account when the account request is denied.
Default: "Account request denied"
Set the email subject sent to the person whose account request is being denied.
📄 More information can be found on the Django documentation for sending emails.
Default: None
Override domain of reset password email (e.g. localhost:8000)
Default: 600
Data editing lock duration in seconds.
Default: True
SSL certificates directory location.
📄 This setting is used for the 'verify' parameter when using the python requests package. More information can be found in the SSL Cert Verification section.
Default: 4.6.2
Version of the bootstrap library. Choose from the list of available bootstrap versions:
- '4.6.2'
- '5.1.3'
- '5.3.1'
Default: None
Track history of listed models. Limited to Data
for now.
Default: False
From core_main_app==2.6
, support for JSON Schema and Data has been implemented.
Set to True
to enable this feature.
Default: True
From core_main_app==2.6
, support for JSON Schema and Data has been implemented,
and the field Data.xml_content
has been renamed Data.content
.
Set to True
to continue using Data.xml_content
(deprecated) instead of Data.content
in the REST API.
Additional deployment settings can be found on the CDCS docker repository: