.
This commit is contained in:
@@ -10,10 +10,34 @@ from django.forms import ModelForm
|
||||
from reversion.admin import VersionAdmin
|
||||
from django.forms.widgets import RadioSelect
|
||||
|
||||
from tinymce.widgets import TinyMCE
|
||||
class ExamInline(admin.TabularInline):
|
||||
model = Question.exams.through
|
||||
extra = 1
|
||||
|
||||
class QuestionAdminForm(ModelForm):
|
||||
class Meta:
|
||||
model = Question
|
||||
|
||||
widgets = {
|
||||
# "normal": RadioSelect(
|
||||
# choices=[(True, 'Yes'),
|
||||
# (False, 'No')])
|
||||
"stem" : TinyMCE(attrs={'cols': 80, 'rows': 30}),
|
||||
"feedback" : TinyMCE(attrs={'cols': 80, 'rows': 30}),
|
||||
"a_answer" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"a_feedback" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"b_answer" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"b_answer" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"c_answer" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"c_answer" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"d_feedback" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"d_feedback" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"e_feedback" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
"e_feedback" : TinyMCE(attrs={'cols': 80, 'rows': 4}),
|
||||
}
|
||||
|
||||
|
||||
class QuestionAdmin(VersionAdmin):
|
||||
#form = RapidAdminForm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user