close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.
- Timestamp:
-
Jun 25, 2008, 10:32:15 PM (16 years ago)
- Author:
-
cmlenz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v1
|
v2
|
|
51 | 51 | This implementation removes a number of the default filters. You could also add any custom filters you may have, etc. |
52 | 52 | |
53 | | Note that the ordering of request filters is quite important. For example, if you insert your custom filter before the `error_filter`, an exception raised in your filter function will not result in a friendly error page, but rather see the exception propagated all the way up. If you insert your filter before the `template_filter`, you will not get a Genshi stream as return value of the next function in the chain, but rather the rendered text. |
| 53 | Note that the ordering of request filters is quite important. For example, if you insert your custom filter before the `error_filter`, an exception raised in your filter function will not result in a friendly error page, but rather result in the exception being propagated all the way up to the WSGI gateway. If you insert your filter before the `template_filter`, you will not get a Genshi stream as return value of the next function in the chain, but rather the rendered text. |
54 | 54 | |
55 | | Generally it makes the most sense to add custom filters close to the end of the list. |
| 55 | When in doubt, add custom filters close to the end of the list. |
56 | 56 | |
57 | 57 | == When to Use Request Filters == |