comparison bns_website/reviews/admin.py @ 29:ced908af601a

Adding support for the TinyMCE javascript editor in the admin for news and reviews apps.
author Brian Neal <bgneal@gmail.com>
date Fri, 04 Nov 2011 19:26:48 -0500
parents 71f2beb03789
children 37d9b6b1a097
comparison
equal deleted inserted replaced
27:a5e8741452a3 29:ced908af601a
1 """ 1 """
2 Automatic admin definitions for the models in the reviews application. 2 Automatic admin definitions for the models in the reviews application.
3 """ 3 """
4 from django.contrib import admin 4 from django.contrib import admin
5 from django.conf import settings
6
5 from reviews.models import Review 7 from reviews.models import Review
6 8
7 9
8 class ReviewAdmin(admin.ModelAdmin): 10 class ReviewAdmin(admin.ModelAdmin):
9 list_display = ['date', 'reviewer', 'review_site', 'title'] 11 list_display = ['date', 'reviewer', 'review_site', 'title']
10 12
13 class Media:
14 js = settings.THIRD_PARTY_JS['tiny_mce']
11 15
12 admin.site.register(Review, ReviewAdmin) 16 admin.site.register(Review, ReviewAdmin)