![](/s/cache/ae/ca/aeca449cec4a4fa0968d708159f238e8.png)
0
Answered
How do you add a collection to Configure->Plugins
I've been working my way through the Ajenti API to develop a plugin, and up until now it has been going well. I need to add a list or collection to the configuration of my plugin, but I'm not sure how to go about doing it; after trying for hours to get it to work I thought I'd ask here.
This is the format of the data I would like to store:
default_classconfig = {
'groups': [{"name": "Shield", "members": ["Nick Fury", "Thaddeus Dugan", "Gabriel Jones"]}, {...}...]
}
I've worked through a collection before, and I used a binder to bind to the collection, but the same techniques don't appear to apply to the ClassConfigEditor.
This is the format of the data I would like to store:
default_classconfig = {
'groups': [{"name": "Shield", "members": ["Nick Fury", "Thaddeus Dugan", "Gabriel Jones"]}, {...}...]
}
I've worked through a collection before, and I used a binder to bind to the collection, but the same techniques don't appear to apply to the ClassConfigEditor.
Answer
![](/s/cache/c3/94/c39402226f80f121f6a818b91880b7d6.png)
Answer
Answered
Sorry for the delay. This is not possible at the moment; classconfigs are bound with simple bind:dict, which only allows binding one level of scalar values.
If you need a complex configuration tree, I suggest instead saving it to JSON or use a more convenient config-to-object binding Reconfigure (https://github.com/Eugeny/reconfigure)
If you need a complex configuration tree, I suggest instead saving it to JSON or use a more convenient config-to-object binding Reconfigure (https://github.com/Eugeny/reconfigure)
![](/s/cache/c3/94/c39402226f80f121f6a818b91880b7d6.png)
BTW in latest Ajenti, you can bind to dict keys directly now with bind="[key]"
Customer support service by UserEcho
If you need a complex configuration tree, I suggest instead saving it to JSON or use a more convenient config-to-object binding Reconfigure (https://github.com/Eugeny/reconfigure)