-.. Copyright (C) 2018, 2019 The Meme Factory, Inc. http://www.karlpinc.com/
+.. Copyright (C) 2018, 2019, 2021 The Meme Factory, Inc.
+ http://www.karlpinc.com/
This file is part of PGWUI_Server.
Your package's ``__init__.py`` must setup the component's default
configuration. It should contain a ``includeme(config)``
function. This is used by Pyramid to initialize the component at
-module load time, and should establish defaults for settings as part
-of it's initialization::
+module load time, and should establish setting defaults and perform
+any necessary pre-processing on settings as part of it's
+initialization::
'''Provide a way to configure PGWUI.
'''
'componentname -- Example PGWUI Component Label'
- def init_menu(config):
- '''Add default menu information into settings when they are not present
+ def establish_settings(config):
+ '''Add defaults into settings when they are not present
+ and pre-process setting values as needed
'''
settings = config.get_settings()
pgwui = settings.setdefault('pgwui', dict())
def includeme(config):
'''Pyramid configuration for PGWUI_Componentname
'''
- init_menu(config)
+ establish_settings(config)
config.add_route(PGWUI_COMPONENT, DEFAULT_COMPONENTNAME_ROUTE)
config.scan()