generated from superdesk/superdesk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDESK-6886
- Loading branch information
Showing
2 changed files
with
97 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
# at https://www.sourcefabric.org/superdesk/license | ||
|
||
from pathlib import Path | ||
from superdesk.default_settings import strtobool, env | ||
from superdesk.default_settings import strtobool, env, BROKER_URL, WS_HOST, WS_PORT | ||
|
||
ABS_PATH = str(Path(__file__).resolve().parent) | ||
|
||
|
@@ -25,61 +25,37 @@ | |
|
||
PLANNING_EVENT_TEMPLATES_ENABLED = True | ||
|
||
RENDITIONS = { | ||
"picture": { | ||
"thumbnail": {"width": 220, "height": 120}, | ||
"viewImage": {"width": 640, "height": 640}, | ||
"baseImage": {"width": 1400, "height": 1400}, | ||
}, | ||
"avatar": { | ||
"thumbnail": {"width": 60, "height": 60}, | ||
"viewImage": {"width": 200, "height": 200}, | ||
}, | ||
} | ||
|
||
WS_HOST = env("WSHOST", "0.0.0.0") | ||
WS_PORT = env("WSPORT", "5100") | ||
|
||
LOG_CONFIG_FILE = env("LOG_CONFIG_FILE", "logging_config.yml") | ||
|
||
REDIS_URL = env("REDIS_URL", "redis://localhost:6379") | ||
if env("REDIS_PORT"): | ||
REDIS_URL = env("REDIS_PORT").replace("tcp:", "redis:") | ||
BROKER_URL = env("CELERY_BROKER_URL", REDIS_URL) | ||
# Highcharts Export Server - default settings | ||
ANALYTICS_ENABLE_SCHEDULED_REPORTS = strtobool(env("ANALYTICS_ENABLE_SCHEDULED_REPORTS", "true")) | ||
|
||
SECRET_KEY = env("SECRET_KEY", "") | ||
MACROS_MODULE = env("MACROS_MODULE", "macros") | ||
|
||
# Highcharts Export Server - default settings | ||
ANALYTICS_ENABLE_SCHEDULED_REPORTS = strtobool( | ||
env('ANALYTICS_ENABLE_SCHEDULED_REPORTS', 'true') | ||
) | ||
|
||
MACROS_MODULE = env('MACROS_MODULE', 'macros') | ||
|
||
HIGHCHARTS_SERVER_HOST = env('HIGHCHARTS_SERVER_HOST', 'localhost') | ||
HIGHCHARTS_SERVER_PORT = env('HIGHCHARTS_SERVER_PORT', '6060') | ||
HIGHCHARTS_LICENSE_ID = env('HIGHCHARTS_LICENSE_ID', '') | ||
HIGHCHARTS_LICENSE_TYPE = 'OEM' | ||
HIGHCHARTS_LICENSEE = 'Sourcefabric Ventures s.r.o.' | ||
HIGHCHARTS_LICENSEE_CONTACT = '[email protected]' | ||
HIGHCHARTS_LICENSE_CUSTOMER_ID = '2' | ||
HIGHCHARTS_LICENSE_EXPIRY = 'Perpetual' | ||
|
||
DEFAULT_LANGUAGE = 'en' | ||
HIGHCHARTS_SERVER_HOST = env("HIGHCHARTS_SERVER_HOST", "localhost") | ||
HIGHCHARTS_SERVER_PORT = env("HIGHCHARTS_SERVER_PORT", "6060") | ||
HIGHCHARTS_LICENSE_ID = env("HIGHCHARTS_LICENSE_ID", "") | ||
HIGHCHARTS_LICENSE_TYPE = "OEM" | ||
HIGHCHARTS_LICENSEE = "Sourcefabric Ventures s.r.o." | ||
HIGHCHARTS_LICENSEE_CONTACT = "[email protected]" | ||
HIGHCHARTS_LICENSE_CUSTOMER_ID = "2" | ||
HIGHCHARTS_LICENSE_EXPIRY = "Perpetual" | ||
|
||
DEFAULT_LANGUAGE = "en" | ||
LANGUAGES = [ | ||
{'language': 'en', 'label': 'English', 'source': True, 'destination': True}, | ||
{'language': 'en-GB', 'label': 'English (GB)', 'source': True, 'destination': True}, | ||
{'language': 'fr', 'label': 'French', 'source': True, 'destination': True}, | ||
{'language': 'ar', 'label': 'Arabic', 'source': True, 'destination': True}, | ||
{'language': 'de', 'label': 'German', 'source': True, 'destination': True}, | ||
{'language': 'no', 'label': 'Norwegian', 'source': True, 'destination': True}, | ||
{'language': 'pt-PT', 'label': 'Portugese', 'source': True, 'destination': True}, | ||
{'language': 'pt-BR', 'label': 'Portugese (Brazil)', 'source': True, 'destination': True}, | ||
{'language': 'zh-Hans', 'label': 'Chinese (分类)', 'source': True, 'destination': True}, | ||
{'language': 'dk', 'label': 'Danish', 'source': True, 'destination': True}, | ||
{'language': 'es', 'label': 'Spanish', 'source': True, 'destination': True}, | ||
{'language': 'se', 'label': 'Swedish', 'source': True, 'destination': True}, | ||
{'language': 'cz', 'label': 'Czech', 'source': True, 'destination': True} | ||
{"language": "en", "label": "English", "source": True, "destination": True}, | ||
{"language": "en-GB", "label": "English (GB)", "source": True, "destination": True}, | ||
{"language": "fr", "label": "French", "source": True, "destination": True}, | ||
{"language": "ar", "label": "Arabic", "source": True, "destination": True}, | ||
{"language": "de", "label": "German", "source": True, "destination": True}, | ||
{"language": "no", "label": "Norwegian", "source": True, "destination": True}, | ||
{"language": "pt-PT", "label": "Portugese", "source": True, "destination": True}, | ||
{"language": "pt-BR", "label": "Portugese (Brazil)", "source": True, "destination": True}, | ||
{"language": "zh-Hans", "label": "Chinese (分类)", "source": True, "destination": True}, | ||
{"language": "dk", "label": "Danish", "source": True, "destination": True}, | ||
{"language": "es", "label": "Spanish", "source": True, "destination": True}, | ||
{"language": "se", "label": "Swedish", "source": True, "destination": True}, | ||
{"language": "cz", "label": "Czech", "source": True, "destination": True}, | ||
] | ||
|
||
GENERATE_SHORT_GUID = True | ||
|
@@ -91,80 +67,97 @@ | |
# publishing of associated and related items | ||
PUBLISH_ASSOCIATED_ITEMS = True | ||
|
||
FTP_TIMEOUT = int(env('FTP_TIMEOUT', 10)) | ||
FTP_TIMEOUT = int(env("FTP_TIMEOUT", 10)) | ||
|
||
PLANNING_EVENT_TEMPLATES_ENABLED = True | ||
|
||
PLANNING_AUTO_ASSIGN_TO_WORKFLOW = True | ||
|
||
# special characters that are disallowed | ||
DISALLOWED_CHARACTERS = ['!', '$', '%', '&', '"', '(', ')', '*', '+', ',', '.', '/', ':', ';', '<', '=', | ||
'>', '?', '@', '[', ']', '\\', '^', '_', '`', '{', '|', '}', '~'] | ||
DISALLOWED_CHARACTERS = [ | ||
"!", | ||
"$", | ||
"%", | ||
"&", | ||
'"', | ||
"(", | ||
")", | ||
"*", | ||
"+", | ||
",", | ||
".", | ||
"/", | ||
":", | ||
";", | ||
"<", | ||
"=", | ||
">", | ||
"?", | ||
"@", | ||
"[", | ||
"]", | ||
"\\", | ||
"^", | ||
"_", | ||
"`", | ||
"{", | ||
"|", | ||
"}", | ||
"~", | ||
] | ||
|
||
# This value gets injected into NewsML 1.2 and G2 output documents. | ||
NEWSML_PROVIDER_ID = 'sourcefabric.org' | ||
ORGANIZATION_NAME = env('ORGANIZATION_NAME', 'Sourcefabric') | ||
ORGANIZATION_NAME_ABBREVIATION = env('ORGANIZATION_NAME_ABBREVIATION', 'SoFab') | ||
NEWSML_PROVIDER_ID = "sourcefabric.org" | ||
ORGANIZATION_NAME = env("ORGANIZATION_NAME", "Sourcefabric") | ||
ORGANIZATION_NAME_ABBREVIATION = env("ORGANIZATION_NAME_ABBREVIATION", "SoFab") | ||
|
||
SCHEMA = { | ||
'picture': { | ||
'slugline': {'required': False}, | ||
'headline': {'required': False}, | ||
'description_text': {'required': True}, | ||
'byline': {'required': False}, | ||
'copyrightnotice': {'required': False}, | ||
'usageterms': {'required': False}, | ||
'ednote': {'required': False}, | ||
}, | ||
'video': { | ||
'slugline': {'required': False}, | ||
'headline': {'required': False}, | ||
'description_text': {'required': True}, | ||
'byline': {'required': True}, | ||
'copyrightnotice': {'required': False}, | ||
'usageterms': {'required': False}, | ||
'ednote': {'required': False}, | ||
"picture": { | ||
"headline": {"required": True}, | ||
"alt_text": {"required": False, "type": "string", "nullable": True}, | ||
"description_text": {"required": True}, | ||
"creditline": {"required": False}, | ||
"copyrightholder": {"required": False}, | ||
"usageterms": {"required": False}, | ||
"copyrightnotice": {"required": False}, | ||
}, | ||
} | ||
|
||
# editor for images, video, audio | ||
EDITOR = { | ||
'picture': { | ||
'headline': {'order': 1, 'sdWidth': 'full'}, | ||
'description_text': {'order': 2, 'sdWidth': 'full', 'textarea': True}, | ||
'byline': {'order': 3, 'displayOnMediaEditor': True}, | ||
'copyrightnotice': {'order': 4, 'displayOnMediaEditor': True}, | ||
'slugline': {'displayOnMediaEditor': True}, | ||
'ednote': {'displayOnMediaEditor': True}, | ||
'usageterms': {'order': 5, 'displayOnMediaEditor': True}, | ||
}, | ||
'video': { | ||
'headline': {'order': 1, 'sdWidth': 'full'}, | ||
'description_text': {'order': 2, 'sdWidth': 'full', 'textarea': True}, | ||
'byline': {'order': 3, 'displayOnMediaEditor': True}, | ||
'copyrightnotice': {'order': 4, 'displayOnMediaEditor': True}, | ||
'slugline': {'displayOnMediaEditor': True}, | ||
'ednote': {'displayOnMediaEditor': True}, | ||
'usageterms': {'order': 5, 'displayOnMediaEditor': True}, | ||
"picture": { | ||
"headline": {"order": 1, "sdWidth": "full", "editor3": True}, | ||
"alt_text": {"order": 2, "sdWidth": "full", "textarea": True, "editor3": True}, | ||
"description_text": {"order": 3, "sdWidth": "full", "textarea": True, "editor3": True}, | ||
"creditline": {"order": 4, "sdWidth": "full", "displayOnMediaEditor": True, "editor3": True}, | ||
"copyrightholder": {"order": 5, "displayOnMediaEditor": True, "editor3": True}, | ||
"usageterms": {"order": 6, "displayOnMediaEditor": True}, | ||
"copyrightnotice": {"order": 7, "displayOnMediaEditor": True}, | ||
}, | ||
} | ||
|
||
SCHEMA['audio'] = SCHEMA['video'] | ||
EDITOR['audio'] = EDITOR['video'] | ||
SCHEMA["audio"] = SCHEMA["video"] = SCHEMA["picture"] | ||
EDITOR["audio"] = EDITOR["video"] = EDITOR["picture"] | ||
|
||
|
||
# media required fields for upload | ||
VALIDATOR_MEDIA_METADATA = { | ||
"slugline": { | ||
"required": False, | ||
}, | ||
"headline": { | ||
"required": True, | ||
}, | ||
"alt_text": { | ||
"required": False, | ||
}, | ||
"description_text": { | ||
"required": True, | ||
}, | ||
"byline": { | ||
"creditline": { | ||
"required": False, | ||
}, | ||
"copyrightholder": { | ||
"required": False, | ||
}, | ||
"usageterms": { | ||
"required": False, | ||
}, | ||
"copyrightnotice": { | ||
|