[Twisted-web] Default processing of a page in
http.Request.process()
David Reid
dreid at dreid.org
Mon Mar 5 13:15:03 CST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You should rarely have to subclass http.Request, in this case you
really want to construct a root resource that validates the request
in getChild[1]. After the request is validated you can return a
Resource representing the page you want to serve. If these are
static files static.File can be used to wrap them. Otherwise you'll
probably have to construct a custom resource that solves your problem.
See the twisted.web howto for more details.[2]
[1] http://twistedmatrix.com/documents/current/api/
twisted.web.resource.Resource.html#getChild
[2] http://twistedmatrix.com/projects/web/documentation/howto/using-
twistedweb.html
- -David
http://dreid.org
"Usually the protocol is this: I appoint someone for a task,
which they are not qualified to do. Then, they have to fight
a bear if they don't want to do it." -- Glyph Lefkowitz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF7GxhrsrO6aeULcgRAl37AJ468ccWegVbR9I4YoVptO/1ZZ3e7wCfU+1l
XLFnh9P1juPRCdL5UN70Ry8=
=gJ2q
-----END PGP SIGNATURE-----
More information about the Twisted-web
mailing list