Malthe Borch wrote:
> 2009/1/14 Rob Miller <r...@burningman.com>:
>> so in building my first repoze.bfg app, it's occurred to me that i'd like to
>> use a custom Request and Response classes, just simple subclasses of the
>> defaults so that i can set configurable class variables like default_charset.
>> unless i'm missing something in the code, there's currently no support for
> You do have the INewRequest event.
yeah, i saw that, and that's what i'll use as a workaround. but:
a) it's less efficient and smells a little bit bad to me to add an event
handler and touch every request instance after it's been created when what i
really want to do is add a class variable to the request class
b) it doesn't address the response object issue. WebOb provides the
ResponseClass attribute on the request object specifically for this purpose,
it seems silly not to use it. yes, there's an INewResponse event... see a).
put another way, ian bicking specifically recommends that subclasses of
Request and Response are a good way to handle certain use cases, and WebOb was
designed with that in mind. it seems reasonable to me to support doing so.
Repoze-dev mailing list