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

View File

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