diff --git a/core/forms.py b/core/forms.py index 7f33e05..a7b000f 100644 --- a/core/forms.py +++ b/core/forms.py @@ -158,7 +158,8 @@ class UploadFileForm(forms.Form): def __init__(self): title = forms.CharField(max_length=50) 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) lat_utm = forms.FloatField(required=False) slug = forms.CharField(max_length=50) diff --git a/core/views_logbooks.py b/core/views_logbooks.py index 27a236e..a498b42 100644 --- a/core/views_logbooks.py +++ b/core/views_logbooks.py @@ -167,58 +167,6 @@ def personForm(request,pk): form=PersonForm(instance=person) 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" :"", - "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): blockroots = models.SurvexBlock.objects.filter(name="rootblock") if len(blockroots)>1: diff --git a/core/views_statistics.py b/core/views_statistics.py index 0b1db33..86ee064 100644 --- a/core/views_statistics.py +++ b/core/views_statistics.py @@ -53,16 +53,22 @@ def pathsreport(request): "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, +# "TINY_MCE_MEDIA_ROOT" : TINY_MCE_MEDIA_ROOT, +# "TINY_MCE_MEDIA_URL" : TINY_MCE_MEDIA_URL, "TUNNEL_DATA" : TUNNEL_DATA, "URL_ROOT" : URL_ROOT } - + # settings are unique by paths are not ncodes = len(pathsdict) - 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', { "pathsdict":pathsdict, diff --git a/parsers/logbooks.py b/parsers/logbooks.py index 3961104..36364b7 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -2,9 +2,9 @@ import csv import datetime import os -import pickle import re import time +import pickle import shelve 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. #trippersons, author = GetTripPersons(trippeople, expedition, logtime_underground) # 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) # DataIssue.objects.create(parser='logbooks', message=message) # logdataissues[tid+"author"]=message diff --git a/templates/editcave.html b/templates/editcave.html index 7336ca1..b8a3e95 100644 --- a/templates/editcave.html +++ b/templates/editcave.html @@ -6,7 +6,7 @@ - + {{ tripForm.media }} {% endblock %} {% block content %} diff --git a/templates/editcave2.html b/templates/editcave2.html index 03deeea..29b9f27 100644 --- a/templates/editcave2.html +++ b/templates/editcave2.html @@ -6,7 +6,7 @@ - + {% endblock %} {% block content %}

Edit Cave

diff --git a/templates/editentrance.html b/templates/editentrance.html index 250bfb0..0b81266 100644 --- a/templates/editentrance.html +++ b/templates/editentrance.html @@ -5,8 +5,7 @@ - - +!----> {% endblock %} {% block content %}
{% csrf_token %} diff --git a/templates/editfile.html b/templates/editfile.html index 64f1fba..b3b53ed 100644 --- a/templates/editfile.html +++ b/templates/editfile.html @@ -24,7 +24,8 @@ - + {{ fileForm.media }} {% endblock %} {% block content %} diff --git a/templates/editflatpage.html b/templates/editflatpage.html index de09b4e..0ac5506 100644 --- a/templates/editflatpage.html +++ b/templates/editflatpage.html @@ -2,12 +2,8 @@ {% block title %}Edit {{ path }}{% endblock %} {% block extrahead %} {% load csrffaker %} - - + + {% endblock %} {% block body %}

Edit {{ path }}

diff --git a/templates/newlogbookentry.html b/templates/newlogbookentry.html index a5ac387..fdb4cbd 100644 --- a/templates/newlogbookentry.html +++ b/templates/newlogbookentry.html @@ -20,7 +20,7 @@ - + {{ tripForm.media }} {% endblock %} {% block content %}