make SurveyAdmin MCEFilebrowserAdmin

This commit is contained in:
darko-poljak 2014-03-09 21:16:30 +01:00
parent 947d3b4381
commit f1ddc5a3a9

View file

@ -4,6 +4,7 @@ from anonsurvey.models import Survey, QuestionGroup, Question,\
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ValidationError
from mce_filebrowser.admin import MCEFilebrowserAdmin
class QuestionInline(admin.StackedInline):
@ -11,7 +12,7 @@ class QuestionInline(admin.StackedInline):
extra = 1
class SurveyAdmin(admin.ModelAdmin):
class SurveyAdmin(MCEFilebrowserAdmin):
prepopulated_fields = {'name': ('title',)}
fields = ('title', 'name', 'intro', 'active')
list_display = ('name', 'title', 'active')