kotti.util

Inheritance Diagram

Inheritance diagram of kotti.util

class kotti.util.LinkParent(title, children)[source]

Bases: kotti.util.LinkBase

A menu link that renders sublinks in a dropdown.

class kotti.util.LinkRenderer(name, predicate=None)[source]

Bases: kotti.util.LinkBase

A menu link that renders a view to render the link.

kotti.util.camel_case_to_name(text)[source]
>>> camel_case_to_name('FooBar')
'foo_bar'
>>> camel_case_to_name('TXTFile')
'txt_file'
>>> camel_case_to_name ('MyTXTFile')
'my_txt_file'
>>> camel_case_to_name('froBOZ')
'fro_boz'
>>> camel_case_to_name('f')
'f'
kotti.util.extract_from_settings(prefix, settings=None)[source]
>>> settings = {
...     'kotti_twitter.foo_bar': '1', 'kotti.spam_eggs': '2'}
>>> print extract_from_settings('kotti_twitter.', settings)
{'foo_bar': '1'}