Instantly share code, notes, and snippets.

@veeti /test.py Secret
Created May 30, 2015

Embed
What would you like to do?
from pyramid.config import Configurator
def my_test_view(request):
return 123
def test_action(config):
introspector = config.registry.introspector
for view in introspector.get_category('views'):
print(view['introspectable']['callable'])
config = Configurator()
config.action('test_action', test_action, args=(config,))
config.add_route('test', '/')
config.add_view(my_test_view, route_name='test')
app = config.make_wsgi_app()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment