From 62bdf8262718b2ea01ea4100570778b1ec560141 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 5 May 2023 10:39:29 -0500 Subject: [PATCH] Include project views by default, in "essential" views --- tailbone/views/essentials.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tailbone/views/essentials.py b/tailbone/views/essentials.py index a8ded812..08d2e0c4 100644 --- a/tailbone/views/essentials.py +++ b/tailbone/views/essentials.py @@ -24,8 +24,6 @@ Essential views for convenient includes """ -from __future__ import unicode_literals, absolute_import - def defaults(config, **kwargs): mod = lambda spec: kwargs.get(spec, spec) @@ -48,6 +46,14 @@ def defaults(config, **kwargs): config.include(mod('tailbone.views.users')) config.include(mod('tailbone.views.views')) + # include project views by default, but let caller avoid that by + # passing False + projects = kwargs.get('tailbone.views.projects', True) + if projects: + if projects is True: + projects = 'tailbone.views.projects' + config.include(projects) + def includeme(config): defaults(config)