comparison gpp/potd/admin.py @ 267:ded03f2513e9

Fixing #116. Allow formatting on POTD description and enable TinyMCE in the admin.
author Brian Neal <bgneal@gmail.com>
date Sat, 25 Sep 2010 18:55:21 +0000
parents dbd703f7d63a
children 3c951521e0ec
comparison
equal deleted inserted replaced
266:4532ed27bed8 267:ded03f2513e9
1 """ 1 """
2 This file contains the admin definitions for the POTD application. 2 This file contains the admin definitions for the POTD application.
3 """ 3 """
4 from django.contrib import admin
5 from django.conf import settings
4 6
5 from django.contrib import admin
6 from potd.models import Photo 7 from potd.models import Photo
7 from potd.models import Current 8 from potd.models import Current
8 from potd.models import Sequence 9 from potd.models import Sequence
9 10
11
10 class PhotoAdmin(admin.ModelAdmin): 12 class PhotoAdmin(admin.ModelAdmin):
11 exclude = ('thumb', ) 13 exclude = ('thumb', )
12 raw_id_fields = ('user', ) 14 raw_id_fields = ('user', )
15
16 class Media:
17 js = settings.GPP_THIRD_PARTY_JS['tiny_mce']
13 18
14 class CurrentAdmin(admin.ModelAdmin): 19 class CurrentAdmin(admin.ModelAdmin):
15 raw_id_fields = ('potd', ) 20 raw_id_fields = ('potd', )
16 21
17 admin.site.register(Photo, PhotoAdmin) 22 admin.site.register(Photo, PhotoAdmin)