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)