feat: add wuttaweb.views.essential
module
This commit is contained in:
parent
95d3623a5e
commit
c6f0007908
|
@ -20,3 +20,4 @@
|
|||
views
|
||||
views.base
|
||||
views.common
|
||||
views.essential
|
||||
|
|
6
docs/api/wuttaweb/views.essential.rst
Normal file
6
docs/api/wuttaweb/views.essential.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
``wuttaweb.views.essential``
|
||||
============================
|
||||
|
||||
.. automodule:: wuttaweb.views.essential
|
||||
:members:
|
|
@ -33,4 +33,4 @@ from .base import View
|
|||
|
||||
|
||||
def includeme(config):
|
||||
config.include('wuttaweb.views.common')
|
||||
config.include('wuttaweb.views.essential')
|
||||
|
|
43
src/wuttaweb/views/essential.py
Normal file
43
src/wuttaweb/views/essential.py
Normal file
|
@ -0,0 +1,43 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
################################################################################
|
||||
#
|
||||
# wuttaweb -- Web App for Wutta Framework
|
||||
# Copyright © 2024 Lance Edgar
|
||||
#
|
||||
# This file is part of Wutta Framework.
|
||||
#
|
||||
# Wutta Framework is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation, either version 3 of the License, or (at your option) any
|
||||
# later version.
|
||||
#
|
||||
# Wutta Framework is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# Wutta Framework. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
"""
|
||||
Essential views for convenient includes
|
||||
|
||||
Most apps should include this module::
|
||||
|
||||
pyramid_config.include('wuttaweb.views.essential')
|
||||
|
||||
That will in turn include the following modules:
|
||||
|
||||
* :mod:`wuttaweb.views.common`
|
||||
"""
|
||||
|
||||
|
||||
def defaults(config, **kwargs):
|
||||
mod = lambda spec: kwargs.get(spec, spec)
|
||||
|
||||
config.include(mod('wuttaweb.views.common'))
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
Loading…
Reference in a new issue