[Twisted-web] web2 response.setCookie and request.getCookie shortcuts?

glyph at divmod.com glyph at divmod.com
Thu Nov 17 19:50:52 MST 2005

On Thu, 17 Nov 2005 15:29:34 -0500, "Clark C. Evans" <cce at clarkevans.com> wrote:

>The acceptable languages that the _response_ is allowed to take can be
>found in the 'Accept-Language' header.  This has the advantage of
>allowing more than one language choice, eighted by preference and
>typically auto-configured by your browser from the operating system
>defaults.  In most browsers this setting can be changed; for example,
>in Firefox go to about:config and navigate to intl.accept_languages.

In this case, since the 'request' object is available, simply pass the appropriate data from the header in question down to the object which needs to be rendered.  In this case there is even less need for the context: a regular HTTP request encapsulates all the data you need!

More information about the Twisted-web mailing list