swh.deposit.config module

swh.deposit.config.setup_django_for(platform=None, config_file=None)[source]
Setup function for command line tools (swh.deposit.create_user) to

initialize the needed db access.

Note

Do not import any django related module prior to this function call. Otherwise, this will raise an django.core.exceptions.ImproperlyConfigured error message.

Parameters
  • platform (str) – the platform the scheduling is running

  • config_file (str) – Extra configuration file (typically for the production platform)

Raises

ValueError in case of wrong platform inputs.

class swh.deposit.config.SWHDefaultConfig(**config)[source]

Bases: swh.core.config.SWHConfig

Mixin intended to enrich views with SWH configuration.

CONFIG_BASE_FILENAME = 'deposit/server'
DEFAULT_CONFIG = {'checks': ('bool', True), 'max_upload_size': ('int', 209715200), 'scheduler': ('dict', {'cls': 'remote', 'args': {'url': 'http://localhost:5008/'}})}
ADDITIONAL_CONFIG = {}