Created
February 28, 2014 00:58
-
-
Save neuman/9263049 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
class PostListView(SiteRootView, TemplateView): | |
template_name = 'posts.html' | |
def get_context_data(self, **kwargs): | |
context = super(PostListView, self).get_context_data(**kwargs) | |
context['posts'] = cm.Post.objects.all().order_by('-updated_at') | |
return context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment