rattail-tutorial/rattail_tutorial/web/subscribers.py

19 lines
448 B
Python
Raw Normal View History

# -*- coding: utf-8; mode: python -*-
"""
Pyramid event subscribers
"""
from __future__ import unicode_literals, absolute_import
import rattail_tutorial
def add_rattail_tutorial_to_context(event):
renderer_globals = event
renderer_globals['rattail_tutorial'] = rattail_tutorial
def includeme(config):
config.include('tailbone.subscribers')
config.add_subscriber(add_rattail_tutorial_to_context, 'pyramid.events.BeforeRender')