aboutsummaryrefslogtreecommitdiff
path: root/radicale_infcloud
diff options
context:
space:
mode:
authorUnrud <unrud@outlook.com>2022-01-19 00:59:45 +0100
committerUnrud <unrud@outlook.com>2022-01-19 01:08:00 +0100
commit3e8e476fc2ff1467ea05aa0944058288ccdadf92 (patch)
treed6b3ab7b8c0775117a034e0f198159d2e538bd96 /radicale_infcloud
parentUpdate for Radicale 3.1.1 (diff)
downloadradicaleinfcloud-3e8e476fc2ff1467ea05aa0944058288ccdadf92.tar.gz
radicaleinfcloud-3e8e476fc2ff1467ea05aa0944058288ccdadf92.tar.bz2
radicaleinfcloud-3e8e476fc2ff1467ea05aa0944058288ccdadf92.zip
Add option for InfCloud configuration
Closes #15
Diffstat (limited to 'radicale_infcloud')
-rw-r--r--radicale_infcloud/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/radicale_infcloud/__init__.py b/radicale_infcloud/__init__.py
index 409ef28..c65d03f 100644
--- a/radicale_infcloud/__init__.py
+++ b/radicale_infcloud/__init__.py
@@ -20,7 +20,10 @@ from radicale.web import internal
import pkg_resources
-PLUGIN_CONFIG_SCHEMA = {"web": {}}
+PLUGIN_CONFIG_SCHEMA = {"web": {
+ "infcloud_config": {
+ "value": "",
+ "type": str}}}
class Web(internal.Web):
@@ -42,4 +45,6 @@ class Web(internal.Web):
<nav>
<ul>
<li><a href="infcloud">InfCloud</a></li>""")
+ if status == client.OK and path == "/.web/infcloud/config.js":
+ answer += self.configuration.get("web", "infcloud_config").encode()
return status, headers, answer
bgstack15