From 95da2684b25e7b5fd1472ee726ab9a1b4df4fb7d Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Wed, 14 Apr 2021 16:47:24 -0500 Subject: [PATCH] Change init_menu() to establish_settings() --- README.rst | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 35bca56..5502e13 100644 --- a/README.rst +++ b/README.rst @@ -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() -- 2.34.1