1
0
Fork 0

feat: add wuttaweb.views.essential module

This commit is contained in:
Lance Edgar 2024-08-04 20:39:42 -05:00
parent 95d3623a5e
commit c6f0007908
4 changed files with 51 additions and 1 deletions

View file

@ -20,3 +20,4 @@
views
views.base
views.common
views.essential

View file

@ -0,0 +1,6 @@
``wuttaweb.views.essential``
============================
.. automodule:: wuttaweb.views.essential
:members:

View file

@ -33,4 +33,4 @@ from .base import View
def includeme(config):
config.include('wuttaweb.views.common')
config.include('wuttaweb.views.essential')

View 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)