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:
Lance Edgar 2022-02-09 18:02:09 -06:00
parent 8cc54b6106
commit f1c2fd399e

View file

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