Olemis Lang <ole...@...> writes:
>
> On Fri, Jan 22, 2010 at 9:17 AM, Olemis Lang <ole...@...> wrote:
> >
> > Use `context` parameter ...
> >
>
> the request object can be obtained from it
>
> > .. [1] IHTMLPreviewRenderer.render
> >
(http://trac.edgewall.org/browser/trunk/trac/mimeview/api.py?rev=8899&marks=483-501#L482
> >
> > --
> > Regards,
> >
> > Olemis.
> >
> > Blog ES: http://simelo-es.blogspot.com/
> > Blog EN: http://simelo-en.blogspot.com/
> >
I'm sorry, I'm really new to python, or maby I'm just slow,
I still don't get it...
Can i get a full example? Where and how can i get hold of the authname?
--- code ---
class MyRenderer(Component):
implements(IHTMLPreviewRenderer)
# IHTMLPreviewRenderer methods
def get_quality_ratio(self, mimetype):
if mimetype in mime_types:
self.mimetype = mimetype
return 9
return 0
def render(self, req, mimetype, content, filename, url):
# somewhere here i want to get hold of the username
return "This is what i want to return"
---/code---
//Erik
--
You received this message because you are subscribed to the Google Groups "Trac
Users" 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/trac-users?hl=en.