How do I add custom middleware to Pyramid. I have a function add_auth(app)
in myapp.lib.auth and I have tried setting my [pipline:main] section to:
[pipeline:main]
pipeline =
egg:WebError#evalerror
egg:myapp.lib.auth.add_auth
sales
I also tried egg:myapp.lib.auth:add_auth, egg:myapp.lib.auth#add_auth. I
have also tried the same making add_auth a class that accepts the app
argument to __init__. I tried those combinations without the egg: as well.
Nothing seems to work to add custom middleware. I always get distribution
not found error.
Is there any documentation on how to add custom middleware?
I did a search on google for "pipeline site:docs.pylonsproject.org" but none
of the pages show how to add custom middleware to an application.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pylons-discuss/-/-TV62bRKFbMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.