Try out new config defaults function for user views
pretty sure this is a good idea but we'll see
This commit is contained in:
parent
8cc54b6106
commit
f1c2fd399e
|
@ -2,7 +2,7 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# Rattail -- Retail Software Framework
|
# Rattail -- Retail Software Framework
|
||||||
# Copyright © 2010-2021 Lance Edgar
|
# Copyright © 2010-2022 Lance Edgar
|
||||||
#
|
#
|
||||||
# This file is part of Rattail.
|
# This file is part of Rattail.
|
||||||
#
|
#
|
||||||
|
@ -516,6 +516,11 @@ class UserEventView(MasterView):
|
||||||
UserEventsView = UserEventView
|
UserEventsView = UserEventView
|
||||||
|
|
||||||
|
|
||||||
|
def defaults(config, **kwargs):
|
||||||
|
base = globals()
|
||||||
|
kwargs.get('UserView', base['UserView']).defaults(config)
|
||||||
|
kwargs.get('UserEventView', base['UserEventView']).defaults(config)
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def includeme(config):
|
||||||
UserView.defaults(config)
|
defaults(config)
|
||||||
UserEventView.defaults(config)
|
|
||||||
|
|
Loading…
Reference in a new issue