Search code examples
pythonlayoutdefaultweb2py

Web2py layout configuration settings


The web2py online book in Chapter 3 Overview says that in the scaffolding application, values for response.title, response.meta.author, etc, are set in the file models/menu.py. While previous versions of Web2py did include the settings in menu.py, in v.2.18.5 the default values are not set in this file. While some of the settings, such as response.meta.author etc are defined in models/db.py, response.title and response.subtitle could not be found in db.py also. The online book does say that these can be defined in any model file. Can someone advise where these settings are now defined?


Solution

  • It appears that those items are no longer defined in the scaffolding app. The default layout simply using request.application as the page title if request.title is not defined. Feel free to define those items wherever, or not at all.