I imagine your tween should just support loading a list of url path
prefixes from the INI that it should ignore. If you specify a default root
factory, your static views will use that as well for better or worse.
Static views are just views that serve files from a directory, so the best
way to avoid dealing with them is to serve them statically using your real
web server (nginx or apache), and that way the requests never hit your app
in the first place.


On Wed, Jan 23, 2013 at 2:36 AM, Andreas Jung <[email protected]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am currently investigating tweens for
>
> - - logging the response time of request
> - - catching and logging error happened inside a request
> - - sending metrics to a central logging server
>
> Right now I am only interested in requests on views
> (not interested in requests to CSS, JS, images etc).
> Currently I am checking after the execution of the 'handler'
> inside the tween if the request object contains
> a 'context' (which is not the case for those resource files).
>
> Is this the canonical way or is there a better way?
>
> Andreas
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQGUBAEBAgAGBQJQ/6EbAAoJEADcfz7u4AZjUGcLv1X9tyJ5IFJftCsjCfY5VuTo
> tooBO/ybPl4vj+YTcq4YMZ1m6uoz97MsJV9vwlb9NF+BYKxWpPI8gaYA6xum2Kg0
> wMd1W843Gg6HTI9tZjjrPLqb97qxdYGywt25NAsoBQW9WLv8IsYxfbbCXtpCf6LZ
> Kw+ztvUfvfS+KSKrgPMZoRnUM5waxAAyjsnt85ZBwTqXY0Zw2nvl9mtGGy566efv
> xeNH95bQUVOruGoO+OEppIo+G3MObXHPHdUWcB83AoSrn04QW7qd6usZqEGf0Gyc
> IcnhWukohVH4XLuO5/LZdaxzEPltPvTAcA+UT6HrJOmQAX5CV4V/efnIifQCf8a0
> P/iC9pHTkVra5zRgGwZTHOVmHliz26kpNsjEtvwIZE9s9jKg023bsrcS3WirO/Q+
> dkkfTpLjbTWzAVfB4X+BVEUt5OWDGr+sD+QPWZn/DcVM83h2b6GMTlKec1DjmO3a
> kvkWv+JaZTvueMfwkbsWpnDLGlXmGfs=
> =j9Xt
> -----END PGP SIGNATURE-----
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to