Skip to content

Instantly share code, notes, and snippets.

@TimFletcher
Created June 18, 2012 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save TimFletcher/2948882 to your computer and use it in GitHub Desktop.
Save TimFletcher/2948882 to your computer and use it in GitHub Desktop.
Django View
from django.shortcuts import render_to_response
from django.template import RequestContext
def some_view(request):
# Request remote page and parse it
foo = 'Some template variable'
template_name = 'path/to/template.html'
return render_to_response(template_name, {
'foo': foo,
}, context_instance=RequestContext(request))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment