I just remembered the debugtoolbar works as a separate application, which
explains why I'm seeing different values for `id(config)` in the toolbar
and main app during setup. unless I am crazy, this should never have
worked.
On Wednesday, September 20, 2023 at 5:46:46 PM UTC-4 Jonathan Vanasco wrote:
> This is driving me a bit crazy. I hope someone can see the issue or
> changelog I am missing in the current pyramid and debugtoolbar.
>
> I am adding some typing and tests to a debug toolbar that has the
> following in the includeme:
>
> ```
> def includeme(config: "Configurator"):
> config.add_debugtoolbar_panel(DogpileDebugPanel)
> config.add_request_method(
> "pyramid_debugtoolbar_dogpile.setup_dogpile_logging",
> "dogpile_logging",
> reify=True,
> )
> ```
>
> Through debugging, i see the includeme is run and the debugtoolbar panel
> is enabled when using the following:
>
> with Configurator() as config:
> config.add_settings({"debugtoolbar.includes":
> ["pyramid_debugtoolbar_dogpile"]})
> config.include("pyramid_debugtoolbar")
> ...
> app = config.make_wsgi_app()
> serve(app, host='0.0.0.0', port=6543)
>
> or
>
> def setUp(self):
> self.config = config = testing.setUp()
> config.add_settings({"debugtoolbar.includes":
> ["pyramid_debugtoolbar_dogpile"]})
> config.include("pyramid_debugtoolbar")
>
> The request method, however, is not added. No request methods I add
> within the includeme persist.
>
> Adding the request method in the main application (copy paste that same
> snippet) will work.
>
> Can anyone help set me on the right path ?
>
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pylons-discuss/dec013a0-7188-4e6c-97fa-3e38494aefc4n%40googlegroups.com.