Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/config.py
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | def setup_django_for(platform=None, config_file=None): | ||||
if config_file: | if config_file: | ||||
os.environ.setdefault("SWH_CONFIG_FILENAME", config_file) | os.environ.setdefault("SWH_CONFIG_FILENAME", config_file) | ||||
import django | import django | ||||
django.setup() | django.setup() | ||||
class SWHDefaultConfig(SWHConfig): | class APIConfig(SWHConfig): | ||||
"""Mixin intended to enrich views with SWH configuration. | """Mixin intended to enrich views with SWH configuration. | ||||
""" | """ | ||||
CONFIG_BASE_FILENAME = "deposit/server" | CONFIG_BASE_FILENAME = "deposit/server" | ||||
DEFAULT_CONFIG = { | DEFAULT_CONFIG = { | ||||
"max_upload_size": ("int", 209715200), | "max_upload_size": ("int", 209715200), | ||||
Show All 18 Lines |