.
This commit is contained in:
@@ -5,3 +5,4 @@ __pycache__
|
|||||||
.vscode/
|
.vscode/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
rad/settings_local.py
|
rad/settings_local.py
|
||||||
|
venv
|
||||||
@@ -27,6 +27,9 @@ from generic.models import Examination, Condition, Sign
|
|||||||
from django.contrib.admin.widgets import FilteredSelectMultiple
|
from django.contrib.admin.widgets import FilteredSelectMultiple
|
||||||
from django.forms.widgets import RadioSelect, TextInput, Textarea
|
from django.forms.widgets import RadioSelect, TextInput, Textarea
|
||||||
|
|
||||||
|
from tinymce.widgets import TinyMCE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LongAnswerForm(ModelForm):
|
class LongAnswerForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
@@ -149,6 +152,7 @@ class LongForm(ModelForm):
|
|||||||
# "normal": RadioSelect(
|
# "normal": RadioSelect(
|
||||||
# choices=[(True, 'Yes'),
|
# choices=[(True, 'Yes'),
|
||||||
# (False, 'No')])
|
# (False, 'No')])
|
||||||
|
"mark_scheme" : TinyMCE(attrs={'cols': 80, 'rows': 30})
|
||||||
}
|
}
|
||||||
|
|
||||||
def save(self, commit=True):
|
def save(self, commit=True):
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ INSTALLED_APPS = [
|
|||||||
"tagulous",
|
"tagulous",
|
||||||
"dbbackup",
|
"dbbackup",
|
||||||
"rest_framework",
|
"rest_framework",
|
||||||
|
"tinymce",
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
|||||||
+3
-1
@@ -65,7 +65,9 @@ urlpatterns = [
|
|||||||
|
|
||||||
|
|
||||||
path('api/', include(router.urls)),
|
path('api/', include(router.urls)),
|
||||||
path('api-auth/', include('rest_framework.urls'))
|
path('api-auth/', include('rest_framework.urls')),
|
||||||
|
|
||||||
|
path('tinymce/', include('tinymce.urls')),
|
||||||
]
|
]
|
||||||
|
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|||||||
@@ -18,3 +18,4 @@ pydicom
|
|||||||
django-dbbackup
|
django-dbbackup
|
||||||
django-hashedfilenamestorage
|
django-hashedfilenamestorage
|
||||||
djangorestframework
|
djangorestframework
|
||||||
|
django-tinymce
|
||||||
Reference in New Issue
Block a user