diff --git a/.gitignore b/.gitignore index d1b0b367..e28ab167 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ __pycache__ .vscode/ .DS_Store rad/settings_local.py +venv \ No newline at end of file diff --git a/longs/forms.py b/longs/forms.py index 073cfebe..8c577fc2 100755 --- a/longs/forms.py +++ b/longs/forms.py @@ -27,6 +27,9 @@ from generic.models import Examination, Condition, Sign from django.contrib.admin.widgets import FilteredSelectMultiple from django.forms.widgets import RadioSelect, TextInput, Textarea +from tinymce.widgets import TinyMCE + + class LongAnswerForm(ModelForm): class Meta: @@ -149,6 +152,7 @@ class LongForm(ModelForm): # "normal": RadioSelect( # choices=[(True, 'Yes'), # (False, 'No')]) + "mark_scheme" : TinyMCE(attrs={'cols': 80, 'rows': 30}) } def save(self, commit=True): diff --git a/rad/settings.py b/rad/settings.py index 5173320b..0830f20a 100644 --- a/rad/settings.py +++ b/rad/settings.py @@ -53,6 +53,7 @@ INSTALLED_APPS = [ "tagulous", "dbbackup", "rest_framework", + "tinymce", ] MIDDLEWARE = [ diff --git a/rad/urls.py b/rad/urls.py index 0ef32119..4d4ca23b 100644 --- a/rad/urls.py +++ b/rad/urls.py @@ -65,7 +65,9 @@ urlpatterns = [ 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) diff --git a/requirements.txt b/requirements.txt index b77922b8..7d262a39 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,4 +17,5 @@ opencv-python pydicom django-dbbackup django-hashedfilenamestorage -djangorestframework \ No newline at end of file +djangorestframework +django-tinymce \ No newline at end of file