Settings
A Daiquiri application can be customised using various settings. Since Daiquiri is based on Django, we use its built-in settings system. Almost every setting has a default value, which is set in the Daiquiri library. The core settings are defined in the daiquiri.core.settings module:
Additional settings, which concern only a single Daiquiri module are defined in the settings module of the particular module:
- daiquiri.auth.settings
- daiquiri.conesearch.settings
- daiquiri.contact.settings
- daiquiri.cutout.settings
- daiquiri.datalink.settings
- daiquiri.files.settings
- daiquiri.jobs.settings
- daiquiri.metadata.settings
- daiquiri.oai.settings
- daiquiri.query.settings
- daiquiri.serve.settings
- daiquiri.stats.settings
- daiquiri.tap.settings
All settings can be changed for your particular app in config/settings/base.py (app specific) or config/settings/local.py (machine specific, and ignored by git). In addition, selected settings can be configured as environment variables, in particular using the .env file in the app directory:
| Setting | Default |
|---|---|
| SECRET_KEY | None (must be supplied) |
| SITE_URL | None |
| DEBUG | None |
| ASYNC | None |
| ALLOWED_HOSTS | ['localhost', '127.0.0.1', '::1'] |
| TIME_ZONE | 'UTC' |
| PROXY | None |
| ADMINS | [] |
| DATABASE_APP | None (must be supplied) |
| DATABASE_DATA | None (must be supplied) |
| TAP_SCHEMA | tap_schema |
| TAP_UPLOAD | tap_upload |
| OAI_SCHEMA | oai_schema |
In the .env file, lists are separated by commas, e.g. ADMINS=Anna Admin <admin@example.com>, Manni Manager <manager@example.com>. Boolean values accept 1, t, true, y, yes, and on for true; other non-empty values are false. Paths read from the environment are made absolute. Since SECRET_KEY, DATABASE_APP, and DATABASE_DATA have no usable default value, they need to be set.
DATABASE_APP and DATABASE_DATA are database URLs understood by
dj-database-url. The default database uses DATABASE_APP; the data,
tap, and oai aliases use DATABASE_DATA, with the TAP and OAI namespaces
selected by TAP_SCHEMA, TAP_UPLOAD, and OAI_SCHEMA. PROXY=True enables
the forwarded-host and forwarded-protocol handling needed behind a reverse
proxy.
In the following all settings, which can be changed from their default values to customize you particular Daiquiri app are described in detail:
daiquiri.core.settings.django
SECRET_KEY
Default: None
Secret key for Django. It must be set in .env and must not be committed.
See also SECRET_KEY in the Django documentation.
DEBUG
Default: None
Debug mode. Set it to False in production. See also DEBUG in the Django documentation. This setting can be set in .env.
BASE_URL
Default: /
Base URL for the Daiquiri app. Set if your Daiquiri app runs under an alias path on your web server, e.g. /daiquiri/. The value is normalized to include a trailing slash.
ALLOWED_HOSTS
Default: ['localhost', '127.0.0.1', '::1']
List of allowed hosts for this app.
See also ALLOWED_HOSTS in the Django documentation. This setting can be set in .env as a comma-separated list.
INSTALLED_APPS
The list of Django apps for this Daiquiri site. Usually it is set to
INSTALLED_APPS = DJANGO_APPS + [
# the list of Daiquiri modules for this site
...
] + ADDITIONAL_APPS
See also INSTALLED_APPS in the Django documentation.
USER_TABLESPACE
Default: 'pg_default' for PostgreSQL, otherwise None
The tablespace where to store the user query-job tables. This setting is only used for the PostgreSQL scientific database.
TIME_ZONE
Default: 'UTC'
The time zone for this Daiquiri app (e.g. Europe/Berlin). It can be set in .env.
ACCOUNT_LOGOUT_ON_GET
Default: True
Designates if a GET request is sufficient to log out. It is enabled by the current source configuration.
ACCOUNT_USERNAME_MIN_LENGTH
Default: 4
The minimal length of usernames.
ACCOUNT_PASSWORD_MIN_LENGTH
Default: 8
The minimal length of passwords.
ACCOUNT_EMAIL_VERIFICATION
Default: 'mandatory'
Designates if new users need to verify their email addresses before logging in. Options are
'mandatory''optional''none'
See also ACCOUNT_EMAIL_VERIFICATION in the django-allauth documentation.
ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION
Default: True
Designates if new users are automatically logged in after validating their email address.
REST_FRAMEWORK
Default:
{
'DEFAULT_THROTTLE_CLASSES': (
'rest_framework.throttling.ScopedRateThrottle',
),
'DEFAULT_THROTTLE_RATES': {
'query.create': '10/second'
}
}
Configuration object for the Django REST framework. Used to adjust the maximum rate in which queries are allowed to be submitted (by anyone). See also Throttling in the Django REST framework documentation.
CELERY_BROKER_URL
Default: amqp://
URL of the RabbitMQ server to be used. For a more sophisticated setup use:
CELERY_BROKER_URL=amqp://<user>:<password>@<host>:<port>/<vhost>
See also deployment. This setting can be set in .env.
EMAIL_BACKEND
Default: 'django.core.mail.backends.console.EmailBackend'
Sets the backend used for email delivery. On a production system, this will be django.core.mail.backends.smtp.EmailBackend. For testing/demonstration django.core.mail.backends.console.EmailBackend can be used. See also Sending email in the Django documentation. This setting can be set in .env.
EMAIL_HOST
Default: None
Hostname of the SMTP server. Can be set in .env.
EMAIL_PORT
Default: '25'
Port of the SMTP server. Can be set in .env.
EMAIL_HOST_USER
Default: None
User for the SMTP server. Can be set in .env.
EMAIL_HOST_PASSWORD
Default: None
Password for the SMTP server. Can be set in .env.
EMAIL_USE_TLS
Default: None
Designates whether STARTTLS is used (usually on port 587). This setting can be set in .env.
DEFAULT_FROM_EMAIL
Default: 'info@example.com'
Sets the From field for emails sent by Daiquiri. This setting can be set in .env.
EMAIL_REPLY_TO
Default: None
Sets the Reply-To recipients for emails sent through Daiquiri’s email helper.
The value is passed unchanged to Django’s reply_to argument, which expects a
list or tuple rather than a single string. Configure it in base.py or
local.py, for example:
EMAIL_REPLY_TO = ['support@example.com']
SENDFILE_BACKEND
Default: 'django_sendfile.backends.simple'
Sets the backend used by django-sendfile when Daiquiri serves protected files
from the files module or generated query downloads. On a production system
using Apache with mod_xsendfile, this can be
django_sendfile.backends.xsendfile. The simple backend streams files through
Django and is suitable for testing and demonstration.
See also Django Sendfile GitHub readme.
MEMCACHE_KEY_PREFIX
Default: None
Key prefix to use for caching with memcached. Enables caching with memcached. See also deployment. Should be set in .env.
daiquiri.core.settings.daiquiri
ASYNC
Default: None
Designates if Celery workers are used for asynchronous tasks like query execution. The current non-query queues are default and download; query workers use the queues configured by QUERY_QUEUES, whose names are prefixed with query_.
IPV4_PRIVACY_MASK
Default: 16
Number of bits kept from IPv4 addresses (e.g. to produce query stats) for anonymity.
IPV6_PRIVACY_MASK
Default: 32
Number of bits kept from IPv6 addresses (e.g. to produce query stats) for anonymity.
SITE_URL
Default: None
Public URL of the Daiquiri site. Used for VO and OAI metadata.
SITE_IDENTIFIER
Default: None
Identifier for the Daiquiri site. Usually the URL without the protocol. Used for VO and OAI metadata.
SITE_TITLE
Default: None
The title for the Daiquiri site. Used for VO registry and service metadata.
SITE_DESCRIPTION
Default: None
The description for the Daiquiri site. This value is defined by the current settings module but is not read directly by the current core VO/OAI serializers.
SITE_LICENSE
Default: None
A license identifier for the Daiquiri site. The available resource-license
constants are defined in daiquiri.metadata.settings; the current core
serializers use the resource license settings rather than reading this value
directly.
SITE_CREATOR
Default: None
Creator name of the Daiquiri site. It is used in VO curation metadata and as the default creator for Datalink OAI records. The current source expects the creator name here; the logo is configured separately by the application.
SITE_CREATOR = 'Daiquiri project'
SITE_CONTACT
Default: None
Contact information for the Daiquiri site. Used in the VO and OAI metadata. It has to be a dictionary of the following form:
{
'name': 'Anna Admin',
'address': 'Beispielstr. 3, 12345 Berlin',
'email': 'contact@example.com',
'telephone': '+49 30 123467'
}
SITE_PUBLISHER
Default: None
Publisher of the Daiquiri site. Used for VO and OAI metadata.
SITE_PUBLISHER_PROPERTIES
Default: {}
XML attributes added to the publisher element in DataCite metadata for schemas, tables, and Datalink records. They can describe a publisher identifier and the scheme used for that identifier. The current VOResource renderer does not use these properties.
SITE_PUBLISHER_PROPERTIES = {
'publisherIdentifier': 'https://ror.org/<id>',
'publisherIdentifierScheme': 'ROR',
'schemeURI': 'https://ror.org/',
}
SITE_CREATED
Default: None
Date of the creation of the Daiquiri site. Used for VO and OAI metadata. Has to be of the form YYYY-MM-DD.
SITE_UPDATED
Default: None
Date of the last update of the Daiquiri site. Used for VO and OAI metadata. Has to be of the form YYYY-MM-DD.
SITE_SUBJECTS
Default:
[
{
'subject': 'Astronomy',
'subjectScheme': 'Library of Congress Subject Headings (LCSH)',
'schemeURI': 'http://id.loc.gov/authorities/subjects',
'valueURI': 'http://id.loc.gov/authorities/subjects/sh85009003',
}
]
Default subjects used by the Dublin Core and DataCite serializers for schema, table, and Datalink OAI records. VO service records use their module-specific subject settings instead.
SITE_TYPE
Default: 'service'
Type for this Daiquiri site. The setting is currently defined but is not read elsewhere in Daiquiri.
daiquiri.core.settings.logging
LOG_LEVEL
Default: None
Level used for the Daiquiri, query, SQL, and rules loggers when the file-logging
configuration is enabled through LOG_DIR. Set it to DEBUG for more verbose
logging. It can be set in .env.
LOG_DIR
Default: None
Enables Daiquiri’s file-logging configuration and sets the directory for
error.log, daiquiri.log, query.log, sql.log, and rules.log. A relative
value such as log is used as supplied; it is not made absolute. When set, the
directory must already exist and be writable. It can be set in .env.
daiquiri.auth.settings
AUTH_SIGNUP
Default: None
Designates if users can register for an account. If it is false, all users need to be created through the Django admin system. This setting is read from .env.
AUTH_WORKFLOW
Default: None
Sets the workflow for user registration. Options are
None: Newly registered users can log in after registration.'activation': Newly registered users need to be activated by a manager or admin.'confirmation': Newly registered users need to be confirmed by a manager before they are activated by an admin.
AUTH_DETAIL_KEYS
Default: []
Sets additional details to be asked from the users when registering. An example would be:
AUTH_DETAIL_KEYS = [
{
'key': 'affiliation',
'label': 'Affiliation',
'data_type': 'text',
'required': True,
'options': []
},
]
where:
keyis the internal identifier,labelthe text shown in the interface,data_typeis the type of the detail, which affects the widget to be used ('text','textarea','select','radio','multiselect', or'checkbox'),requiredwhether this detail is required or not,optionsa list of options for select, radio, multiselect, or checkbox widgets of the form[{'id': id, 'label': label}, ...], and- optional
help_textis explanatory text displayed with the field.
AUTH_TERMS_OF_USE
Default: False
Designates whether terms of use are displayed on the signup page and need to be accepted to register. The text to be displayed needs to be configured in a template account/terms_of_use.html.
daiquiri.conesearch.settings
CONESEARCH_ADAPTER
Default: 'daiquiri.conesearch.adapter.BaseConeSearchAdapter'
Sets the adapter class to be used by the cone search API. The adapter class encapsulates all operations for creating a cone-search VOTable output from an API request. A custom adapter should inherit from daiquiri.conesearch.adapter.BaseConeSearchAdapter.
CONESEARCH_RESOURCES
Default: {}
Defines which database tables are available to the cone-search API and the
cone-search query form. Keys must match the schema_name.table_name value used
by the query form. Each entry contains:
schema_name: schema containing the table,table_name: table to query,column_names: resource columns returned forVERB=1; principal or all metadata columns are added forVERB=2orVERB=3, andcoordinates_columns: mapsRAandDECto the table columns used in the cone predicate.
CONESEARCH_RESOURCES = {
'catalog.sources': {
'schema_name': 'catalog',
'table_name': 'sources',
'column_names': ['source_id', 'ra', 'dec'],
'coordinates_columns': {'RA': 'ra', 'DEC': 'dec'},
},
'catalog.components': {
'schema_name': 'catalog',
'table_name': 'components',
'column_names': ['source_id', 'ra_component', 'dec_component'],
'coordinates_columns': {
'RA': 'ra_component',
'DEC': 'dec_component',
},
},
}
CONESEARCH_ANONYMOUS
Default: False
Designates if cone searches can be done by anonymous users.
CONESEARCH_SUBJECTS
Default: ['cone search']
Defines the subjects included in the cone-search VOResource record.
CONESEARCH_RANGES
Default:
{
'RA': {
'min': 0,
'max': 360,
},
'DEC': {
'min': -90,
'max': 90,
},
'SR': {
'min': 0,
'max': 10,
},
}
Defines the inclusive minimum and maximum accepted values for right ascension
(RA), declination (DEC), and search radius (SR) in both cone-search entry
points. The maximum SR is also advertised as maxSR in the cone-search
VOResource capability.
CONESEARCH_DEFAULTS
Default:
{
'RA': 0.0,
'DEC': 0.0,
'SR': 1.0,
}
Defines the initial values shown in the cone-search query form and the test query advertised in the cone-search VOResource record. The standalone cone-search API still requires all three request parameters.
CONESEARCH_MAX_RECORDS
Default: 10000
Sets the maximum number of records returned by a cone-search query and is
advertised as maxRecords in each cone-search VOResource capability. If a
query produces more records, the response is truncated to this limit and its
VOTable includes a QUERY_STATUS of OVERFLOW.
daiquiri.datalink.settings
DATALINK_ADAPTER
Default: 'daiquiri.datalink.adapter.DefaultDatalinkAdapter'
Sets the adapter class used by the Datalink service. A custom adapter can
provide application-specific resource discovery, link rows, and view context.
The configured class is imported and instantiated without arguments. It should
inherit from BaseDatalinkAdapter and can use the supplied Datalink mixins.
DATALINK_TABLES
Default: []
List of Datalink tables that should be included by the table-based Datalink
adapter and the OAI Datalink integration. Each entry is a database table name
in the form schema_name.table_name.
DATALINK_TABLES = [
'release_schema.datalink',
]
DATALINK_CUSTOM_SEMANTICS
Default:
{
'#doi': 'The access_url points to the Digital Object Identifier (DOI) of the object.',
}
Maps relative custom Datalink semantic identifiers to their descriptions. For each matching link row, the active Datalink adapter replaces the identifier with the URL of the site’s semantics page plus that identifier. The bundled semantics-page views currently render the module’s default mapping directly, so overriding this setting changes link expansion but not the descriptions shown on those pages.
daiquiri.contact.settings
ANNOUNCEMENT_MESSAGE_FILTER
Default: 'daiquiri.contact.filters.DefaultMessageFilter'
Sets the import path of the filter class used to determine which announcement
messages a visitor sees. A custom class must provide a CHOICES collection for
the admin form and a callable for each choice key. Each callable accepts a
single request argument and returns whether the message should be shown. It
can inherit from daiquiri.contact.filters.DefaultMessageFilter to retain the
built-in choices.
The announcement messages can be added in the Django admin site. In order to show
the messages on a webpage, one has to load the announcement tags in the template
{% load announcement_tags %} and then place {% show_announcements %} where
the messages should be shown.
daiquiri.cutout.settings
CUTOUT_ADAPTER
Default: 'daiquiri.cutout.adapter.SimpleCutOutAdapter'
Sets the adapter class to be used by the cutout API. The adapter class encapsulates all operations for creating a cutout from an API request. A custom adapter should inherit from daiquiri.cutout.adapter.BaseCutOutAdapter.
CUTOUT_ANONYMOUS
Default: False
Designates if the cutout interface can be accessed by anonymous users.
daiquiri.files.settings
FILES_BASE_PATH
Default: None
Sets the absolute local root used to locate files served by the files module,
documentation-search files, and file references packaged by query archive
jobs. It is read from .env and must be configured when the files module is
installed.
FILES_BASE_URL
Default: None
Sets the public base URL used for files-module and documentation-search links.
It is also prepended to file references in query-result downloads for columns
with the meta.ref;meta.file, meta.ref;meta.image, or meta.ref;meta.note
UCD. It is read from .env.
FILES_DOCS_REL_PATH
Default: None
Sets the relative file path to the documentation files on which the file search will be executed.
The path is given relative to the FILES_BASE_PATH.
In order to use the search function for the files, one has to include the search field into the template.
{% include 'files/search-input.html' %}
The layout of the results page can be changed by overriding the template files/search-results.html in the Daiquiri app.
FILES_SEARCH_RESULTS_PER_PAGE
Default: 5
Sets the number of search results per page.
daiquiri.jobs.settings
JOB_MAX_RECORDS
Default:
{
'anonymous': 5000000,
'user': 5000000,
'users': {},
'groups': {},
}
Sets the maximum number of query-result rows retained and returned for
anonymous and authenticated users. A client-supplied MAXREC can lower this
limit, and reaching the effective limit marks the result as overflowed. The
users and groups mappings can provide limits for specific users or groups;
when several limits apply, the largest applicable value is used. The anonymous
limit is also advertised as the TAP service output limit.
daiquiri.metadata.settings
METADATA_COLUMN_PERMISSIONS
Default: False
Designates if permissions can be assigned to individual columns (in addition to tables and schemas). This is an experimental feature.
METADATA_BASE_URL
Default: None
Sets the absolute URL of the metadata module, e.g. http://example.com/metadata/. The URL is used to create links to the landing pages for schemas and tables in VOTables if a DOI is not set.
METADATA_COLUMN_WIDTH
Default:
{
'default': 200,
}
Sets the default width of columns in query results and the serve app. A
specific column can be given a different width using a key of the form
schema_name.table_name.column_name; columns without a specific entry use
the default value.
ARCHIVE_BASE_PATH
Default: None
Sets the absolute base path value for archive-related integrations. It is read
from the ARCHIVE_BASE_PATH environment variable. The setting remains defined
in daiquiri.metadata.settings, but the current Daiquiri source does not
provide a separate daiquiri.archive module or archive-specific consumers.
daiquiri.oai.settings
OAI_SCHEMA
Default: 'oai_schema'
Sets the name of the schema or database namespace for OAI records. If more than one Daiquiri application is using the same data database, they cannot use the same OAI schema. The default is oai_schema; this setting can be changed in .env.
OAI_ADAPTER
Default: 'daiquiri.oai.adapter.DefaultOaiAdapter'
Sets the adapter class to be used by the OAI-PMH API. The adapter class encapsulates the operations used to set up and retrieve OAI records. A custom adapter should inherit from daiquiri.oai.adapter.BaseOaiAdapter. Usually this will be done in the Daiquiri app, e.g.
OAI_ADAPTER = 'app.adapter.OaiAdapter'
OAI_PAGE_SIZE
Default: 500
Maximum number of records returned in each OAI-PMH ListIdentifiers or
ListRecords page. Daiquiri returns a resumption token when further records
are available.
daiquiri.query.settings
QUERY_ANONYMOUS
Default: False
Designates if the query interface can be accessed by anonymous users. The permissions on schemas and tables need to be configured using the metadata interface.
QUERY_USER_SCHEMA_PREFIX
Default: 'daiquiri_user_'
Sets the prefix for user schemas in the data database. Each user has a private schema where the result table of successful queries are stored.
QUERY_QUOTA
Default:
{
'anonymous': '100Mb',
'user': '10000Mb',
'users': {},
'groups': {}
}
Sets the maximum quota for tables in a user’s personal schema. The quota needs to be set for the anonymous user as well as regular logged-in users (user). Additionally, users or groups can be assigned individual quotas, e.g.:
{
'anonymous': '100Mb',
'user': '10000Mb',
'users': {
'admin': '1000Gb'
},
'groups': {
'collab': '100Gb'
}
}
If more than one quota applies, the maximum is used.
QUERY_SYNC_TIMEOUT
Default: 5
Sets the timeout for synchronous (TAP) queries in seconds.
QUERY_ARCHIVE_MAX_NROWS
Default: 1000
Sets the maximum number of rows in a query result that can be processed by an archive job. Archive processing is rejected when the result contains more rows than this limit.
QUERY_MAX_ACTIVE_JOBS
Default:
{
'anonymous': '1'
}
Sets the maximum number of simultaneous jobs for users. The setting works analogously to QUERY_QUOTA: if more than one maximum applies, the largest applicable value is used. If no maximum is given, no maximum is enforced.
QUERY_QUEUES
Default:
[
{
'key': 'short',
'label': '30 seconds',
'timeout': 30,
'access_level': 'PUBLIC',
'groups': [],
},
{
'key': 'long',
'label': '1 Hour',
'timeout': 3600,
'access_level': 'PUBLIC',
'groups': [],
},
]
Sets the different query queues that can be selected by users. Each queue is represented by a dictionary where:
keyis the internal identifier,labelis the text shown in the interface,timeoutis the maximum execution time in seconds,access_levelandgroupsrestrict who can use the queue, and- optional
concurrencysets the number of worker processes started for that queue (default1).
Asynchronous query jobs are routed to query_<key>; for example, the defaults
use query_short and query_long.
QUERY_LANGUAGES
Default:
[
{
'key': 'adql',
'version': 2.0,
'label': 'ADQL',
'description': '',
'quote_char': '"'
}
]
Sets the different query languages, which can be selected by the users. Each query language is represented by a dictionary where:
keyis the internal identifier,versionis the version reported as part of the query-language identifier,labelis the text shown in the interface,descriptionis advertised in the TAP capabilities document, e.g. to TOPCAT, andquote_charis inserted around identifiers selected in the web query editor.
Optional access_level and groups fields restrict who can select a language.
The default configuration provides ADQL 2.0, which Daiquiri translates for the
configured data database. For other configured languages, the submitted
query is passed to the database-specific query processor without ADQL
translation, so only languages that processor and database accept should be
advertised.
QUERY_FORMS
Default:
[
{
'key': 'sql',
'label': 'SQL query',
'template': 'query/query_form_sql.html'
},
{
'key': 'conesearch',
'label': 'Cone search',
'submit': 'Submit new cone search',
'template': 'query/query_form_cone.html',
'adapter': 'daiquiri.query.adapter.ConeSearchQueryFormAdapter',
},
{
'key': 'upload',
'label': 'Upload VOTable',
'template': 'query/query_form_upload.html',
},
]
Sets the forms available to users in the query interface. Each form is represented by a dictionary where:
keyis the internal identifier,labelis the text shown in the interface,submitis the submit-button label when a form provides one,templateis the path to the Django template with the markup for the form, andadapteroptionally names the class that supplies the form fields, query language, and generated query throughget_fields(),get_query_language(data), andget_query(data, user).
Included in Daiquiri are the sql, conesearch, and upload forms.
QUERY_PLOTS
Default:
[
{
'key': 'scatter_plot',
'label': 'Scatter',
'is_active': True,
},
{
'key': 'scatter_cmap_plot',
'label': 'Scatter (color coded)',
'is_active': True,
},
{
'key': 'histogram',
'label': 'Histogram',
'is_active': True,
}
]
This setting is defined by daiquiri.query.settings, but the current Daiquiri
code does not read it. Changing its entries does not currently change the plot
types shown in the web interface.
QUERY_DROPDOWNS
Default:
[
{
'key': 'schemas',
'label': 'Database',
},
{
'key': 'columns',
'label': 'Columns',
},
{
'key': 'functions',
'label': 'Functions',
},
{
'key': 'simbad',
'label': 'Simbad',
'options': {'url': 'http://simbad.u-strasbg.fr/simbad/sim-id'},
},
{
'key': 'vizier',
'label': 'VizieR',
'options': {
'url': 'http://vizier.u-strasbg.fr/viz-bin/votable',
'catalogs': ['I/322A', 'I/259'],
},
},
{
'key': 'examples',
'label': 'Examples',
'classes': 'ms-auto',
},
]
Sets the additional dropdown menus above the SQL query interface available for users. Each dropdown is represented by a dictionary where:
keyis the internal identifier,labelis the text shown in the interface,optionscontains additional options specific to the dropdown, andclassescan add CSS classes to the dropdown entry.
Included in Daiquiri are database, column, function, Simbad, VizieR, and example dropdowns.
QUERY_DOWNLOADS
Default:
[
{
'key': 'table',
'model': 'daiquiri.query.models.DownloadJob',
'params': ['format_key'],
},
{
'key': 'archive',
'model': 'daiquiri.query.models.QueryArchiveJob',
'params': ['column_name'],
},
]
Defines the asynchronous download jobs available for completed query results.
For each entry, key identifies the download type, model is the import path
of its job model, and params lists request fields copied to the model when a
job is found or created and returned with submitted-job status. A model can
also implement get_form(query_job) to expose a custom download form. The
bundled web interface has dedicated handling for the table and archive
keys.
QUERY_DOWNLOAD_DIR
Default: None
Sets the absolute base path of the download files served by the query module in the local file system. It is read from .env; the query application requires a download directory to be configured.
QUERY_UPLOAD_DIR
Default: None
Sets the absolute base path for files uploaded through the query interface.
It is read from .env; uploaded files are stored below a user-specific
subdirectory, so this directory must be configured when query uploads are
enabled.
QUERY_DEFAULT_DOWNLOAD_FORMAT
Default: 'votable'
Sets the response format used when a query request does not specify one. The
value must be a key from QUERY_DOWNLOAD_FORMATS.
QUERY_DOWNLOAD_FORMATS
Default:
[
{
'key': 'votable',
'extension': 'xml',
'content_type': 'application/xml',
'label': 'IVOA VOTable',
'help': 'A XML file using the IVOA VOTable format. Use this option if you intend to use VO compatible software to further process the data.',
},
{
'key': 'csv',
'extension': 'csv',
'content_type': 'text/csv',
'label': 'Comma-separated Values',
'help': 'A text file with a line for each row of the table. The fields are delimited by a comma and quoted by double quotes.',
},
{
'key': 'fits',
'extension': 'fits',
'content_type': 'application/fits',
'label': 'FITS',
'help': 'Flexible Image Transport System (FITS) file format.'
},
{
'key': 'parquet',
'extension': 'parquet',
'content_type': 'application/parquet',
'label': 'Parquet',
'help': 'Apache Parquet file format.',
},
]
Defines the supported query-result formats. The registry is used to validate synchronous and TAP response formats, produce direct and asynchronous result downloads, and advertise TAP output formats. Each format is represented by a dictionary where:
keyis the internal identifier,extensionthe file extension,content_typethe content type,labelthe text shown in the interface, andhelpa more verbose help text for the format.
NOTE: If you want faster parquet file generation, get the latest binary of pg2parquet and put it somewhere covered by your PATH variable. This Rust binary is up to four times faster than the Python-based fastparquet fallback.
QUERY_UPLOAD
Default: True
Enables the upload functionality in the query interface.
QUERY_UPLOAD_LIMIT
Default:
{
'anonymous': '10Mb',
'user': '100Mb',
'users': {},
'groups': {}
}
Sets the maximum size of each file uploaded through the query or TAP interface.
This is a per-file limit, not a cumulative storage quota. The anonymous and
user entries provide the base limits; the users and groups mappings can
provide individual limits, and the largest applicable value is used. The
anonymous limit is also advertised in the TAP capabilities document.
daiquiri.serve.settings
SERVE_DOWNLOAD_DIR
Default: None
Sets the optional base path for download files served by the serve module. The current serve settings module defines this value, but the current serve code does not read it directly; configure application-specific serving code if a separate download directory is needed.
SERVE_RESOLVER
Default: None
Sets a resolver class for reference URLs handled by the serve module. When set,
the class is imported and instantiated without arguments. It must provide
resolve(request, key, value) and return a redirect target; returning None
causes a 404 response.
daiquiri.stats.settings
STATS_RESOURCE_TYPES
Default:
[
{
'key': 'CONESEARCH',
'label': 'Performed cone searches'
},
{
'key': 'CUTOUT',
'label': 'Performed cutouts'
},
{
'key': 'FILE',
'label': 'Downloaded static files'
},
{
'key': 'CREATE_ZIP',
'label': 'Created zip files'
},
{
'key': 'CREATE_FILE',
'label': 'Created files for download'
},
{
'key': 'DOWNLOAD',
'label': 'Downloaded files'
},
{
'key': 'UPLOAD',
'label': 'Uploaded files'
},
{
'key': 'QUERY',
'label': 'Queries'
}
]
Sets the aggregated resource types shown in the stats management overview.
daiquiri.tap.settings
TAP_SCHEMA
Default: 'tap_schema'
Sets the namespace containing the TAP metadata tables. It is a PostgreSQL
schema or a MySQL database and is used by the tap database alias. During
query processing, the literal TAP_SCHEMA and tap_schema placeholders are
replaced with this value. If more than one Daiquiri application uses the same
data database, each needs a different TAP metadata namespace. This setting
can be set in .env.
TAP_UPLOAD
Default: 'tap_upload'
Sets the namespace where tables ingested for TAP uploads are created. For
PostgreSQL this is a schema; for MySQL it is a database. During query
processing, the literal TAP_UPLOAD and tap_upload placeholders are replaced
with this value. If more than one Daiquiri application uses the same data
database, each needs a different upload namespace. This setting can be set in
.env.
daiquiri.uws integration
UWS_RESOURCES
There is no default value; daiquiri.uws.urls reads this optional setting
directly from Django’s settings. If it is absent, no additional UWS resources
are registered.
Configures UWS services in addition to the TAP module. For example:
UWS_RESOURCES = [
{
'prefix': r'query',
'viewset': 'daiquiri.query.viewsets.UWSQueryJobViewSet',
'base_name': 'uws_query',
},
]
Each entry is a dictionary where:
prefixis the URL prefix of the service (e.g.query),viewsetis the import path of the viewset class handling the requests, andbase_nameis the basename used to register routes with the Django REST framework.