PasteDeploy's documentation helped, but it was still a little confusing. To add a custom middleware you have to write it like:
def auth_filter_factory(global_conf):
def add_auth(app):
# make wsgi app
return app
return add_auth
and then in the INI file:
[pipeline:main]
pipeline =
egg:WebError#evalerror
auth
sales
[filter:auth]
paste.filter_factory = sales.lib.auth:auth_filter_factory
Any additional keys under [filter:auth] will be sent to auth_filter_factory as keyword arguments
--
Jason