Created
June 18, 2012 15:19
-
-
Save TimFletcher/2948882 to your computer and use it in GitHub Desktop.
Django View
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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