Mercurial > public > sg101
comparison forums/admin.py @ 740:3e1905e523be
Django 1.6: get_query_set -> get_queryset, etc.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 29 Dec 2013 12:57:03 -0600 |
parents | ee87ea74d46b |
children |
comparison
equal
deleted
inserted
replaced
739:fb2877dd6182 | 740:3e1905e523be |
---|---|
59 date_hierarchy = 'creation_date' | 59 date_hierarchy = 'creation_date' |
60 list_filter = ('creation_date', 'update_date', ) | 60 list_filter = ('creation_date', 'update_date', ) |
61 ordering = ('-creation_date', ) | 61 ordering = ('-creation_date', ) |
62 save_on_top = True | 62 save_on_top = True |
63 | 63 |
64 def queryset(self, request): | 64 def get_queryset(self, request): |
65 return Post.objects.select_related('user') | 65 return Post.objects.select_related('user') |
66 | 66 |
67 # override save_model() to update the search index | 67 # override save_model() to update the search index |
68 def save_model(self, request, obj, form, change): | 68 def save_model(self, request, obj, form, change): |
69 obj.save() | 69 obj.save() |