On 11/29/12, Olemis Lang <[email protected]> wrote:
> On 11/29/12, Olemis Lang <[email protected]> wrote:
>> On 11/29/12, Matevz Bradac <[email protected]> wrote:
>>> Hi,
>>>
>>
>> :)
>>
[...]
>
> I suggest you to consider this approach
>
> 1. BH theme already implements IRequestFilter
> 2. implement a stream wrapper overriding render
> method in such a way that DocType.HTML5
> (or something more accurate , your choice ;)
> is used instead of HTML strict *if appropriate*
> e.g. bloodhound theme enabled , etc, etc ...
... and an elegant solution without wrappers consists of overriding
access to class' render method using instance attribute , like this
{{{
#!py
new_doctype = DocType.HTML5
def new_render(method, doctype, out, encoding, [...] ):
return stream.render(method, doctype=new_doctype, out=out,
encoding=encoding)
stream.render = new_render
[...]
}}}
[...]
--
Regards,
Olemis.
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
Featured article: