how to read different block setting from kinto.ini file

63 views Asked by At

I created a different block in my kinto.ini file and i want to use those setting in my program.

#kinto.ini
[mysetting]
name = json
username = jsonmellow
password = *********


[app:main]
use = egg:kinto
kinto.storage_url = postgre//

if we use 'config.get_setting' function of kinto it gives me the setting of the default block "app:main" only. so how can i get the other setting from "mysetting" block.

1

There are 1 answers

0
slav0nic On

you can use prefix for your settings like:

[app:main]
...
mysetting.name = json
mysetting.username = jsonmellow

But if you still need some extra section in ini: How can I access a custom section in a Pyramid .ini file?