Mercurial > public > bravenewsurf
comparison bns_website/reviews/admin.py @ 34:37d9b6b1a097
Added reviews template tag. Fix ordering of reviews. Tweaked the display of the reviews page.
Addresses ticket 2.
author | Chris Ridgway <ckridgway@gmail.com> |
---|---|
date | Sat, 05 Nov 2011 23:53:10 -0500 |
parents | ced908af601a |
children |
comparison
equal
deleted
inserted
replaced
33:b5329e6ad828 | 34:37d9b6b1a097 |
---|---|
6 | 6 |
7 from reviews.models import Review | 7 from reviews.models import Review |
8 | 8 |
9 | 9 |
10 class ReviewAdmin(admin.ModelAdmin): | 10 class ReviewAdmin(admin.ModelAdmin): |
11 list_filter = ['date'] | |
12 search_fields = ['title', 'review', 'reviewer', 'review_site'] | |
11 list_display = ['date', 'reviewer', 'review_site', 'title'] | 13 list_display = ['date', 'reviewer', 'review_site', 'title'] |
14 ordering = ['-date'] | |
12 | 15 |
13 class Media: | 16 class Media: |
14 js = settings.THIRD_PARTY_JS['tiny_mce'] | 17 js = settings.THIRD_PARTY_JS['tiny_mce'] |
15 | 18 |
16 admin.site.register(Review, ReviewAdmin) | 19 admin.site.register(Review, ReviewAdmin) |