Update some more view config syntax
some common ones used by a particular app..
This commit is contained in:
parent
738d5d94e0
commit
a28a801a62
5 changed files with 45 additions and 6 deletions
7
tailbone/views/vendors/__init__.py
vendored
7
tailbone/views/vendors/__init__.py
vendored
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -29,5 +29,10 @@ from __future__ import unicode_literals, absolute_import
|
|||
from .core import VendorView
|
||||
|
||||
|
||||
def defaults(config, **kwargs):
|
||||
from .core import defaults
|
||||
return defaults(config, **kwargs)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
config.include('tailbone.views.vendors.core')
|
||||
|
|
9
tailbone/views/vendors/core.py
vendored
9
tailbone/views/vendors/core.py
vendored
|
@ -180,5 +180,12 @@ class VendorView(MasterView):
|
|||
]
|
||||
|
||||
|
||||
def includeme(config):
|
||||
def defaults(config, **kwargs):
|
||||
base = globals()
|
||||
|
||||
VendorView = kwargs.get('VendorView', base['VendorView'])
|
||||
VendorView.defaults(config)
|
||||
|
||||
|
||||
def includeme(config):
|
||||
defaults(config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue