Change init_menu() to establish_settings()
authorKarl O. Pinc <kop@karlpinc.com>
Wed, 14 Apr 2021 21:47:24 +0000 (16:47 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Thu, 15 Apr 2021 21:50:00 +0000 (16:50 -0500)
README.rst

index 35bca56d391ca5315079df7e7f41eb8dc11581c0..5502e1300c18637af3063b450ee703b5e9e57c49 100644 (file)
@@ -1,4 +1,5 @@
-.. 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.
@@ -505,8 +506,9 @@ same name.  So the entry point assignment in setup.py looks like::
 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.
    '''
@@ -516,8 +518,9 @@ of it's initialization::
        '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())
@@ -529,7 +532,7 @@ of it's initialization::
    def includeme(config):
        '''Pyramid configuration for PGWUI_Componentname
        '''
-       init_menu(config)
+       establish_settings(config)
        config.add_route(PGWUI_COMPONENT, DEFAULT_COMPONENTNAME_ROUTE)
        config.scan()