forked from expo/troggle
remove tinyMCE more
This commit is contained in:
parent
38fa552c00
commit
d4deea2019
@ -158,7 +158,8 @@ class UploadFileForm(forms.Form):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
title = forms.CharField(max_length=50)
|
title = forms.CharField(max_length=50)
|
||||||
file = forms.FileField()
|
file = forms.FileField()
|
||||||
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}))
|
||||||
lon_utm = forms.FloatField(required=False)
|
lon_utm = forms.FloatField(required=False)
|
||||||
lat_utm = forms.FloatField(required=False)
|
lat_utm = forms.FloatField(required=False)
|
||||||
slug = forms.CharField(max_length=50)
|
slug = forms.CharField(max_length=50)
|
||||||
|
@ -167,58 +167,6 @@ def personForm(request,pk):
|
|||||||
form=PersonForm(instance=person)
|
form=PersonForm(instance=person)
|
||||||
return render(request,'personform.html', {'form':form,})
|
return render(request,'personform.html', {'form':form,})
|
||||||
|
|
||||||
def pathsreport(request):
|
|
||||||
pathsdict={
|
|
||||||
"ADMIN_MEDIA_PREFIX" : ADMIN_MEDIA_PREFIX,
|
|
||||||
"ADMIN_MEDIA_PREFIX" : ADMIN_MEDIA_PREFIX,
|
|
||||||
"CAVEDESCRIPTIONSX" : CAVEDESCRIPTIONS,
|
|
||||||
"DIR_ROOT" : DIR_ROOT,
|
|
||||||
"ENTRANCEDESCRIPTIONS" : ENTRANCEDESCRIPTIONS,
|
|
||||||
"EXPOUSER_EMAIL" : EXPOUSER_EMAIL,
|
|
||||||
"EXPOUSERPASS" :"<redacted>",
|
|
||||||
"EXPOUSER" : EXPOUSER,
|
|
||||||
"EXPOWEB" : EXPOWEB,
|
|
||||||
"EXPOWEB_URL" : EXPOWEB_URL,
|
|
||||||
"FILES" : FILES,
|
|
||||||
"JSLIB_URL" : JSLIB_URL,
|
|
||||||
"LOGFILE" : LOGFILE,
|
|
||||||
"LOGIN_REDIRECT_URL" : LOGIN_REDIRECT_URL,
|
|
||||||
"MEDIA_ADMIN_DIR" : MEDIA_ADMIN_DIR,
|
|
||||||
"MEDIA_ROOT" : MEDIA_ROOT,
|
|
||||||
"MEDIA_URL" : MEDIA_URL,
|
|
||||||
#"PHOTOS_ROOT" : PHOTOS_ROOT,
|
|
||||||
"PHOTOS_URL" : PHOTOS_URL,
|
|
||||||
"PYTHON_PATH" : PYTHON_PATH,
|
|
||||||
"REPOS_ROOT_PATH" : REPOS_ROOT_PATH,
|
|
||||||
"ROOT_URLCONF" : ROOT_URLCONF,
|
|
||||||
"STATIC_ROOT" : STATIC_ROOT,
|
|
||||||
"STATIC_URL" : STATIC_URL,
|
|
||||||
"SURVEX_DATA" : SURVEX_DATA,
|
|
||||||
"SURVEY_SCANS" : SURVEY_SCANS,
|
|
||||||
"SURVEYS" : SURVEYS,
|
|
||||||
"SURVEYS_URL" : SURVEYS_URL,
|
|
||||||
"SVX_URL" : SVX_URL,
|
|
||||||
"TEMPLATE_DIRS" : TEMPLATE_DIRS,
|
|
||||||
"THREEDCACHEDIR" : THREEDCACHEDIR,
|
|
||||||
"TINY_MCE_MEDIA_ROOT" : TINY_MCE_MEDIA_ROOT,
|
|
||||||
"TINY_MCE_MEDIA_URL" : TINY_MCE_MEDIA_URL,
|
|
||||||
"TUNNEL_DATA" : TUNNEL_DATA,
|
|
||||||
"URL_ROOT" : URL_ROOT
|
|
||||||
}
|
|
||||||
|
|
||||||
ncodes = len(pathsdict)
|
|
||||||
|
|
||||||
bycodeslist = sorted(pathsdict.items())
|
|
||||||
bypathslist = sorted(iter(pathsdict.items()), key=lambda x: x[1])
|
|
||||||
|
|
||||||
return render(request, 'pathsreport.html', {
|
|
||||||
"pathsdict":pathsdict,
|
|
||||||
"bycodeslist":bycodeslist,
|
|
||||||
"bypathslist":bypathslist,
|
|
||||||
"ncodes":ncodes})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def experimental(request):
|
def experimental(request):
|
||||||
blockroots = models.SurvexBlock.objects.filter(name="rootblock")
|
blockroots = models.SurvexBlock.objects.filter(name="rootblock")
|
||||||
if len(blockroots)>1:
|
if len(blockroots)>1:
|
||||||
|
@ -53,16 +53,22 @@ def pathsreport(request):
|
|||||||
"SVX_URL" : SVX_URL,
|
"SVX_URL" : SVX_URL,
|
||||||
"TEMPLATE_DIRS" : TEMPLATE_DIRS,
|
"TEMPLATE_DIRS" : TEMPLATE_DIRS,
|
||||||
"THREEDCACHEDIR" : THREEDCACHEDIR,
|
"THREEDCACHEDIR" : THREEDCACHEDIR,
|
||||||
"TINY_MCE_MEDIA_ROOT" : TINY_MCE_MEDIA_ROOT,
|
# "TINY_MCE_MEDIA_ROOT" : TINY_MCE_MEDIA_ROOT,
|
||||||
"TINY_MCE_MEDIA_URL" : TINY_MCE_MEDIA_URL,
|
# "TINY_MCE_MEDIA_URL" : TINY_MCE_MEDIA_URL,
|
||||||
"TUNNEL_DATA" : TUNNEL_DATA,
|
"TUNNEL_DATA" : TUNNEL_DATA,
|
||||||
"URL_ROOT" : URL_ROOT
|
"URL_ROOT" : URL_ROOT
|
||||||
}
|
}
|
||||||
|
# settings are unique by paths are not
|
||||||
ncodes = len(pathsdict)
|
ncodes = len(pathsdict)
|
||||||
|
|
||||||
bycodeslist = sorted(pathsdict.items())
|
bycodeslist = sorted(pathsdict.items())
|
||||||
bypathslist = sorted(iter(pathsdict.items()), key=lambda x: x[1])
|
|
||||||
|
# create a temporary list
|
||||||
|
bypathslist = []
|
||||||
|
# iterate through the dictionary and append each tuple into the temporary list
|
||||||
|
for key, value in pathsdict.items():
|
||||||
|
tmptuple = (key, value)
|
||||||
|
bypathslist.append(tmptuple)
|
||||||
|
# bypathslist = sorted(bypathslist)
|
||||||
|
|
||||||
return render(request, 'pathsreport.html', {
|
return render(request, 'pathsreport.html', {
|
||||||
"pathsdict":pathsdict,
|
"pathsdict":pathsdict,
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
import csv
|
import csv
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import pickle
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
import pickle
|
||||||
import shelve
|
import shelve
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@ -205,7 +205,7 @@ def EnterLogIntoObjStore(year, date, tripcave, triptitle, text, trippeople, tu,
|
|||||||
# or design a different way to do it.
|
# or design a different way to do it.
|
||||||
#trippersons, author = GetTripPersons(trippeople, expedition, logtime_underground)
|
#trippersons, author = GetTripPersons(trippeople, expedition, logtime_underground)
|
||||||
# if not author:
|
# if not author:
|
||||||
# print(" ! - Skipping logentry: " + title + " - no author for entry")
|
# print(" ! - Skipping logentry: " + title + " - no RECOGNISED author for entry")
|
||||||
# message = " ! - Skipping logentry: %s - no author for entry in year '%s'" % (title, expedition.year)
|
# message = " ! - Skipping logentry: %s - no author for entry in year '%s'" % (title, expedition.year)
|
||||||
# DataIssue.objects.create(parser='logbooks', message=message)
|
# DataIssue.objects.create(parser='logbooks', message=message)
|
||||||
# logdataissues[tid+"author"]=message
|
# logdataissues[tid+"author"]=message
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
||||||
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
|
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
<!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>-->
|
||||||
{{ tripForm.media }}
|
{{ tripForm.media }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
||||||
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
|
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
<!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>-->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Edit Cave</h1>
|
<h1>Edit Cave</h1>
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
||||||
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
|
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>-->
|
||||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
||||||
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
|
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
<!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
||||||
|
-->
|
||||||
{{ fileForm.media }}
|
{{ fileForm.media }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -2,12 +2,8 @@
|
|||||||
{% block title %}Edit {{ path }}{% endblock %}
|
{% block title %}Edit {{ path }}{% endblock %}
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
{% load csrffaker %}
|
{% load csrffaker %}
|
||||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
<!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>-->
|
||||||
<script type="text/javascript">
|
<!-- <script type="text/javascript"> tinyMCE.init({ mode : "textareas" }); </script>-->
|
||||||
tinyMCE.init({
|
|
||||||
mode : "textareas"
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<h1>Edit {{ path }}</h1>
|
<h1>Edit {{ path }}</h1>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
|
||||||
<script src="{{ settings.JSLIB_URL }}jquery/jquery-ui.min.js" type="text/javascript"></script>
|
<script src="{{ settings.JSLIB_URL }}jquery/jquery-ui.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>
|
<!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>-->
|
||||||
{{ tripForm.media }}
|
{{ tripForm.media }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
Loading…
Reference in New Issue
Block a user