On 6/17/07, voltron <[EMAIL PROTECTED]> wrote:
>
> ok, I think I´m onto something:
>
> def dec(func):
> def wrapper(*vars):
> print "About to call decorated function %s." %
> func.func_name
> print request.environ["HTTP_REFERER"]
> return render_response(request.environ["HTTP_REFERER"])
> print "decorator"
>
> return wrapper
>
> this tries to call the function it was decoration but cannot find the
> template
>
> >> raise exceptions.TopLevelLookupException("Cant locate template for uri
> >> '%s'" % uri)
> mako.exceptions.TopLevelLookupException: Cant locate template for uri
> 'http://localhost:5000/home'
You told it to render a template fetched from a remote URL, which is
impossible (how can a finished page be suitable as a template? does
Mako even do urllib lookups?) and a big security hole (what if the
user is coming from a malicious page?) Try
render_response("/home.html") or some other template in your templates
directory, and see if that works. I assume that if you can access
'render_response' at all, you can access all of its usual templates.
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---