2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 16:51:54 +00:00

Disable TinyMCE

This commit is contained in:
Philip Sargent 2020-06-13 23:16:19 +01:00
parent f8fa426adb
commit 38fa552c00
4 changed files with 15 additions and 13 deletions

View File

@ -6,7 +6,7 @@ from django.forms import ModelForm
from django.forms.models import modelformset_factory
from django.contrib.admin.widgets import AdminDateWidget
from tinymce.widgets import TinyMCE
#from tinymce.widgets import TinyMCE
from troggle.core.models import Person, PersonExpedition, Expedition
from troggle.core.models_caves import Cave, LogbookEntry, QM, Entrance, CaveAndEntrance
@ -123,7 +123,8 @@ def getTripForm(expedition):
cave = forms.ChoiceField([(c, c) for c in caves], required=False)
location = forms.CharField(max_length=200, required=False)
caveOrLocation = forms.ChoiceField([("cave", "Cave"), ("location", "Location")], widget = forms.widgets.RadioSelect())
html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 30}))
# html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 30}))
html = forms.CharField(widget=forms.Textarea(attrs={"cols":80, "rows":20}))
def clean(self):
print((dir(self)))

View File

@ -7,7 +7,7 @@ from django.core.urlresolvers import reverse
from django.template import Context, loader
import django.forms as forms
from tinymce.widgets import TinyMCE
#from tinymce.widgets import TinyMCE
from troggle.helper import login_required_if_public
from troggle.flatpages.models import Redirect, EntranceRedirect
@ -183,4 +183,5 @@ def editflatpage(request, path):
class FlatPageForm(forms.Form):
title = forms.CharField(widget=forms.TextInput(attrs={'size':'60'}))
html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 20}))
#html = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 20}))
html = forms.CharField(widget=forms.Textarea(attrs={"cols":80, "rows":20}))

View File

@ -116,7 +116,7 @@ INSTALLED_APPS = (
'django.contrib.redirects',
'django.contrib.messages',
'django.contrib.staticfiles',
'tinymce',
# 'tinymce',
'registration',
'troggle.profiles',
'troggle.core',
@ -146,12 +146,12 @@ AUTH_PROFILE_MODULE = 'core.person'
QM_PATTERN="\[\[\s*[Qq][Mm]:([ABC]?)(\d{4})-(\d*)-(\d*)\]\]"
TINYMCE_DEFAULT_CONFIG = {
'plugins': "table,spellchecker,paste,searchreplace",
'theme': "advanced",
}
TINYMCE_SPELLCHECKER = False
TINYMCE_COMPRESSOR = True
# TINYMCE_DEFAULT_CONFIG = {
# 'plugins': "table,spellchecker,paste,searchreplace",
# 'theme': "advanced",
# }
# TINYMCE_SPELLCHECKER = False
# TINYMCE_COMPRESSOR = True
MAX_LOGBOOK_ENTRY_TITLE_LENGTH = 200

View File

@ -106,8 +106,8 @@ actualurlpatterns = patterns('',
{'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
(r'^tinymce_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.TINY_MCE_MEDIA_ROOT, 'show_indexes': True}),
#(r'^tinymce_media/(?P<path>.*)$', 'django.views.static.serve',
# {'document_root': settings.TINY_MCE_MEDIA_ROOT, 'show_indexes': True}),
url(r'^survexblock/(.+)$', views_caves.survexblock, name="survexblock"),