cookiecutter-wuttaweb/{{ cookiecutter.repo_name }}/{{ cookiecutter.package_name }}/config.py
Lance Edgar 46b33a622f initial template for app based on wuttaweb
with e.g. `poser install` command
2024-11-26 11:16:09 -06:00

30 lines
1 KiB
Python

# -*- coding: utf-8; -*-
"""
{{cookiecutter.project_name}} config extensions
"""
from wuttjamaican.conf import WuttaConfigExtension
class {{cookiecutter.__studly_prefix}}Config(WuttaConfigExtension):
"""
Config extension for {{cookiecutter.project_name}}
"""
key = '{{cookiecutter.package_name}}'
def configure(self, config):
# app info
config.setdefault(f'{config.appname}.app_title', "{{cookiecutter.project_name.replace('"', '\\"')}}")
config.setdefault(f'{config.appname}.app_dist', "{{cookiecutter.distribution_name}}")
# app model
config.setdefault(f'{config.appname}.model_spec', '{{cookiecutter.package_name}}.db.model')
# web app menu
config.setdefault(f'{config.appname}.web.menus.handler_spec',
'{{cookiecutter.package_name}}.web.menus:{{cookiecutter.__studly_prefix}}MenuHandler')
# web app libcache
#config.setdefault('tailbone.static_libcache.module', '{{cookiecutter.package_name}}.web.static')