From f1c2fd399ea6f2fe285aad080f61950d7d195e49 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 9 Feb 2022 18:02:09 -0600 Subject: [PATCH] Try out new config defaults function for user views pretty sure this is a good idea but we'll see --- tailbone/views/users.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tailbone/views/users.py b/tailbone/views/users.py index 124d355a..157f42ee 100644 --- a/tailbone/views/users.py +++ b/tailbone/views/users.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2021 Lance Edgar +# Copyright © 2010-2022 Lance Edgar # # This file is part of Rattail. # @@ -516,6 +516,11 @@ class UserEventView(MasterView): 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): - UserView.defaults(config) - UserEventView.defaults(config) + defaults(config)