Configuration options¶
A CATMAID instance can be configured mainly through the settings.py file, which
is located in the django/projects/mysite directory. Along with
settings_base.py (which is not supposed to be edited) the instance
configuration is defined. Settings defined in settings_base.py can be
overridden in settings.py. Below is an explanation of all available settings.
CELERY_WORKER_CONCURRENCYControls how many asynchronous Celery workers are allowed to run. This controls how many asynchronous tasks can be processed in parallel.
NODE_LIST_MAXIMUM_COUNTThe maximum number of nodes that should be retrieved for a bounding box query as it is used to render tracing data. If set to
None, no limit will be applied which can be slighly faster if node limiting isn’t necessary in most cases.
NODE_PROVIDERSThis variable takes a list of node provider names, which are iterated during a node query as long as no result data is found. The next provider, if any, is only used if the current node provider either doesn’t match the request or decides it can’t provide a useful answer. An entry can either by a single node provider name (e.g. “postgis2d”) or a tuple (name, options) to pass in additional options for a node provider. Possible node provider names are: postgis2d, postgis2dblurry, postgis3d and postgis3dblurry. In addition to these, cache table can be configured, which allows the use of the following node proviers: cached_json, cached_json_text, cached_msgpack.
CREATE_DEFAULT_DATAVIEWSThis setting specifies whether or not two default data views will be created during the initial migration of the database and is
Trueby default. It is typically only useful if theDVIDorJaneliaRendermiddleware are in use and doesn’t have any effect after the initial migration.
MAX_PARALLEL_ASYNC_WORKERSControl how many co-processes can be spawned from an async (Celery) worker. This means if
MAX_PARALLEL_ASYNC_WORKERSis set to3and assumingCELERY_WORKER_CONCURRENCYis set to2, asyncronous processing in CATMAID can be expected to use a maximum of6processes.
DATA_UPLOAD_MAX_MEMORY_SIZEThis option controls the maximum allowed request size that the client application is allowed to send, in bytes. By default this is set to 10 MB. If a request exceeds this limit, error code 400 is returned.
REQUIRE_EXTRA_TOKEN_PERMISSIONSTo write to CATMAID through its API using an API token, users need to have a dedicated “API write” permission, called “Can annotate project using API token” in the admin UI. To allow users with regular annotate permission to write to the backend using the API, this variable can be set to False. The default value is True.
SPATIAL_UPDATE_NOTIFICATIONSIf enabled, each spatial update (e.g placing, updating or deleting treenodes, connectors, connector links) will trigger a PostgreSQL event named “catmaid.spatial-update”. This allows cache update workers to update caches quickly after a change. Disabled by default.
CLIENT_SETTINGSCan be a JSON string or dictionary that keeps default values for the whole instance for the client settings. Keys of the dictionary are the client-settings values, e.g. “neuron-name-service”. The values are the settings values in the format the front-end expects. For instance, to show by default all annotations that are labeled with “neuron name” as textual representation of neurons, this line could be used:
CLIENT_SETTINGS = ‘{“neuron-name-service”: {“component_list”: [{“id”: “skeletonid”, “name”: “Skeleton ID”}, {“id”: “neuronname”, “name”: “Neuron name”}, {“id”: “all-meta”, “name”: “All annotations annotated with "neuron name"”, “option”: “neuron name”}]}}’
By default, no settings are set and this value is None.
FORCE_CLIENT_SETTINGBy default, existing client settings won’t be replaced if they exist already. To force a replace, set this variable to True.
CMTK_TEMPLATE_SPACESA list that defines folders with additional CMTK template spaces that can be used with e.g. elmr or the nat.virtualflybrains R packages. Empty by default.
STATIC_EXTENSION_ROOTThe absolute local path where the static extension files are kept. These can be loaded by the front-end to include custom out-of-source extensions in the front-end (e.g. a custom widget). Defaults to
<catmaid-paith>/django/staticext.
STATIC_EXTENSION_URLThe URL under which custom front-end code can be made available. It is expected to map to
STATIC_EXTENSION_ROOTand is by default set to to<catmaid-subdir>/staticext/.
STATIC_EXTENSION_FILESA list of file names that are allowed to be loaded by the front-end through
STATIC_EXTENSION_URLandSTATIC_EXTENSION_ROOT. Empty by default.
NEW_USER_CREATE_USER_GROUPWhether or not a matching user group should be created for every newly created user. This can make user management easier if a lot of shared data access is configured.
USER_REGISTRATION_CONFIRM_TERMSWhether or not a user registration form requires users to accept a set of terms and conditions. Disabled by default.
USER_REGISTRATION_CONFIRM_TERMS_TEXTThe terms and conditions users need to accept upon registering, if this confirmation is required.
PROJECT_TOKEN_USER_VISIBILITYIf enabled, logged in users will only see other users when they share a project token. Disabled by default.