Pylons/pyramid_debugtoolbar — pull request #206 by jvanasco (2014-12-18 21:14:30+00:00)
Title: configurable request_history params

This is regarding https://github.com/Pylons/pyramid_debugtoolbar/issues/205

I have a few notes:

1. I did some light housekeeping and alphabetized the imports and some settings in __init__.py ; it was starting to get hard to understand what was/wasn't imported.

2. I added a new function to `utils` -- `get_application_registry`. An issue I ran into, is that the actual settings are located in two distinct areas, depending on where you access the request.

* The setup routines are called by the "end-user's" application. The settings are in `request.registry.settings`.
* The view routines are called within a "child" application (i guess due to the make_wsgiapp). The settings are still located in the "end-user's" application, but this is now in `request.registry.parent_registry.settings`

The `button_style` in `request_view` was broken because of this (now fixed).

3. I enabled ToolbarStorage to have a configurable default too. All current requests to it specify the exact number, but there was a default already so i thought it should be configurable.