markitup for festival + new emailer

This commit is contained in:
Sanj 2011-12-02 02:41:11 +05:30
parent 35bc0bba57
commit b6903cb912
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from django.contrib import admin
from models import *
from markitup.widgets import MarkItUpWidget
class AudioInline(admin.StackedInline):
model = Audio
@ -26,6 +27,7 @@ class TalkAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'presenter', 'session',)
list_filter = ['session']
search_fields = ('title', 'intro', 'presenter',)
formfield_overrides = {models.TextField: {'widget': MarkItUpWidget}}
#hide meeting field
class MeetingDayInline(admin.StackedInline):
@ -37,11 +39,13 @@ class ParticipantInline(admin.StackedInline):
extra = 3
class MeetingAdmin(admin.ModelAdmin):
formfield_overrides = {models.TextField: {'widget': MarkItUpWidget}}
inlines = [MeetingDayInline, ImageInline, DocumentInline, ParticipantInline]
prepopulated_fields = {"slug": ("title",)}
save_on_top = True
class ProjectAdmin(admin.ModelAdmin):
formfield_overrides = {models.TextField: {'widget': MarkItUpWidget}}
prepopulated_fields = {"slug": ("title",)}
save_on_top = True
@ -49,6 +53,7 @@ class SessionAdmin(admin.ModelAdmin):
search_fields = ('title', 'intro',)
list_filter = ['day']
list_display = ('__unicode__',)
formfield_overrides = {models.TextField: {'widget': MarkItUpWidget}}
class ParticipantAdmin(admin.ModelAdmin):
search_fields = ('title', 'short_bio',)

View File

@ -155,10 +155,11 @@ INSTALLED_APPS = (
# 'itfcore',
'festival',
'insidepages',
'erang',
# 'erang',
'erang_organised',
'scriptbank',
'bestpractices',
'emailer',
'tagging',
'app',
'api',
@ -179,6 +180,7 @@ INSTALLED_APPS = (
)
ACCOUNT_ACTIVATION_DAYS = 30
#overwrite default settings with local settings
try:
from local_settings import *