Skip to content

Instantly share code, notes, and snippets.

@ojii
Created January 4, 2011 22:29
Show Gist options
  • Save ojii/765567 to your computer and use it in GitHub Desktop.
Save ojii/765567 to your computer and use it in GitHub Desktop.
def render_page(request, page):
context = RequestContext(request)
context['lang'] = get_language_from_request(request)
context['current_page'] = page
context['has_change_permissions'] = page.has_change_permission(request)
request._current_page_cache = page
render_to_response(page.get_template(), context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment