aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--radicale_infcloud/__init__.py7
2 files changed, 11 insertions, 1 deletions
diff --git a/README.md b/README.md
index 9b2e289..9215d23 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,14 @@ python3 -m pip install --upgrade https://github.com/Unrud/RadicaleInfCloud/archi
Set the configuration option `type` in the `web` section to `radicale_infcloud`.
+The value of `infcloud_config` is appended to InfCloud's `config.js`.
+
```ini
[web]
type = radicale_infcloud
+# Optional InfCloud configuration
+infcloud_config = globalInterfaceLanguage='de_DE';
+ globalTimeZone='Europe/Berlin';
```
## License
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