======================================== Filter chaining for Paste Pipelines ======================================== This module tests ordering of execution for filters in a Paste pipeline. To run: 1) Make sure ``paster`` is in your PATH. 2) Execute ``PYTHONPATH=. paster serve serve.ini`` Running Deliverance Themeswitcher -------------------------------------- The files prefixed with ``dv`` connote the adaption of this to actually do Deliverance themeswitching middleware: 1) ``sh dvrun.sh`` 2) Go to ``http://localhost:8080/example.html`` You might have to reload that URL a second time to get it to take affect. Note that this example doesn't switch rule files, but that's easy (just call ``set_rule_uri``). Purpose -------------- This testbed was created to try and figure out how to get middleware filters that correctly trigger a key in ``environ`` to choose the theme. It has proven a challenge to correctly affect the environ used when Deliverance is run. Do you put a filter to the "left" of Deliverance in a pipeline or to the right? As such, this test case just tries to show how filters can be setup and executed. Here is the output you get when starting the Paste server:: PYTHONPATH=. paster serve serve.ini Creating filter right Creating filter middle Creating filter left Starting server in PID 3654. serving on http://127.0.0.1:8080 Here is what you get when you go to a URL such as ``http://localhost:8080/`` (any URL on 8080 will do): Entering left, FI keys are [] Entering middle, FI keys are ['FI_left'] Entering right, FI keys are ['FI_middle', 'FI_left'] Entering echo, FI keys are ['FI_right', 'FI_middle', 'FI_left']