view bns_website/news/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 6cb0d49187ae
children
line wrap: on
line source
"""
Automatic admin definitions for the models in the news application.

"""
from django.contrib import admin
from django.conf import settings

from news.models import News


class NewsAdmin(admin.ModelAdmin):
    list_filter = ['date']
    search_fields = ['title', 'content']

    class Media:
        js = settings.THIRD_PARTY_JS['tiny_mce']

admin.site.register(News, NewsAdmin)