Hi Folks
First I tried work with buffers like
------ in my template
<%
mybuffer = context._buffer_stack[0].getvalue()
## Here some custom def
## Now empty the buffer
context._buffer_stack[0].data[:] = []
%>
${mybuffer}
-------------------
But because of some <%inherit file="/base/index.html"/>\ can turn this
approach difficult.
Now I am reading about Middleware and seem be the solution.
I found this Middleware :
StripHtmlCommentsMiddleware
http://djangosnippets.org/snippets/123/
So I did:
./config/middleware.py
from MyApps.lib.middleware import StripHtmlCommentsMiddleware
....
app = StripHtmlCommentsMiddleware(app)
./lib/middleware.py
this snippet code (http://djangosnippets.org/snippets/123/)
So this snippet code is wrong? Some tip to fix it, (just for test)
There is another Middleware to do this? I dont want reinvent the wheel
Regards
Mario
macm
--
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].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.