Skip to content

Instantly share code, notes, and snippets.

@witsch
Created May 25, 2012 08:19
Show Gist options
  • Save witsch/2786593 to your computer and use it in GitHub Desktop.
Save witsch/2786593 to your computer and use it in GitHub Desktop.
lookup and render a given path from inside a view etc
from tribaspace.router import Router
path = '/foo/bar'
newreq = Request.blank(path=path, base_url=request.application_url)
newreq.registry = registry
markup = Router(registry).handle_request(newreq)
print markup.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment