Created
February 20, 2014 12:54
-
-
Save dead23angel/9112875 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
from blog.views import Post | |
def home(request): | |
vars = dict ( | |
posts=Post.objects.all().order_by('-timestamp')[:10], | |
) | |
return render_to_response('index.html', vars, context_instance=RequestContext(request)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment