forked from expo/troggle
removing cruft, renaming badly named things
This commit is contained in:
@@ -96,7 +96,7 @@ class SimpleTest(SimpleTestCase):
|
||||
from troggle.core.views.expo import expofiles_redirect, expofilessingle, expopage, editexpopage, mediapage, map, mapfile
|
||||
from troggle.core.views.logbooks import expedition, personexpedition, Expeditions_tsvListView, Expeditions_jsonListView
|
||||
from troggle.core.views.logbooks import get_logbook_entries, logbookentry, logbookSearch
|
||||
from troggle.core.views.logbooks import personindex, person, get_people
|
||||
from troggle.core.views.logbooks import notablepersons, person, get_people
|
||||
from troggle.core.views.other import troggle404, frontpage
|
||||
from troggle.core.views.prospect import prospecting
|
||||
from troggle.core.views.prospect import prospecting_image
|
||||
|
||||
@@ -92,8 +92,8 @@ class PostTests(TestCase):
|
||||
content = response.content.decode()
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.status_code, HTTPStatus.OK)
|
||||
with open('test_up.html', 'w') as f:
|
||||
f.write(content)
|
||||
# with open('test_up.html', 'w') as f:
|
||||
# f.write(content)
|
||||
t = re.search(r'README.txt', content)
|
||||
self.assertIsNone(t, 'Logged in as \'' + u.username + '\' (not staff) but failed to upload file' )
|
||||
|
||||
|
||||
@@ -169,8 +169,6 @@ def wiki_to_html_short(value, autoescape=None):
|
||||
value = re.sub(r"\[\[\s*cave:([^\s]+)\s*\s*\]\]", r'<a href="%scave/\1/">\1</a>' % settings.URL_ROOT, value, re.DOTALL)
|
||||
#make people links
|
||||
value = re.sub(r"\[\[\s*person:(.+)\|(.+)\]\]",r'<a href="%sperson/\1/">\2</a>' % settings.URL_ROOT, value, re.DOTALL)
|
||||
#make subcave links
|
||||
value = re.sub(r"\[\[\s*subcave:(.+)\|(.+)\]\]",r'<a href="%ssubcave/\1/">\2</a>' % settings.URL_ROOT, value, re.DOTALL)
|
||||
#make cavedescription links
|
||||
value = re.sub(r"\[\[\s*cavedescription:(.+)\|(.+)\]\]",r'<a href="%scavedescription/\1/">\2</a>' % settings.URL_ROOT, value, re.DOTALL)
|
||||
|
||||
|
||||
@@ -354,7 +354,7 @@ def edit_cave(request, slug=None):
|
||||
#versionControlForm = VersionControlCommentForm()
|
||||
|
||||
return render(request,
|
||||
'editcave2.html',
|
||||
'editcave.html',
|
||||
{'form': form, 'cave': cave, 'message': message,
|
||||
'caveAndEntranceFormSet': ceFormSet,
|
||||
#'versionControlForm': versionControlForm
|
||||
|
||||
@@ -31,7 +31,7 @@ It uses the global object TROG to hold some cached pages.
|
||||
todo = '''Fix the get_person_chronology() display bug.
|
||||
'''
|
||||
|
||||
def personindex(request):
|
||||
def notablepersons(request):
|
||||
persons = Person.objects.all()
|
||||
# From what I can tell, "persons" seems to be the table rows, while "pcols" is the table columns. - AC 16 Feb 09
|
||||
pcols = [ ]
|
||||
@@ -45,7 +45,7 @@ def personindex(request):
|
||||
if person.bisnotable():
|
||||
notablepersons.append(person)
|
||||
|
||||
return render(request,'personindex.html', {'persons': persons, 'pcols':pcols, 'notablepersons':notablepersons})
|
||||
return render(request,'notablepersons.html', {'persons': persons, 'pcols':pcols, 'notablepersons':notablepersons})
|
||||
|
||||
|
||||
def expedition(request, expeditionname):
|
||||
|
||||
@@ -33,10 +33,6 @@ todo = '''
|
||||
When we have done all the old logbooks, delete this function and the two templates.
|
||||
|
||||
- But how does this interact with troggle/logbooksdump.py ?
|
||||
|
||||
- deleted newfile() - check on deleted UploadFileForm using the editfile.html template which is about re-submitting
|
||||
a LBE aka TripReport
|
||||
|
||||
'''
|
||||
|
||||
def todos(request, module):
|
||||
@@ -214,7 +210,7 @@ def scanupload(request, wallet=None):
|
||||
'''
|
||||
filesaved = False
|
||||
actual_saved = []
|
||||
print(f'! - FORM scanupload - start {wallet}')
|
||||
# print(f'! - FORM scanupload - start {wallet}')
|
||||
if wallet is None:
|
||||
wallet = "2021#01" # improve this later
|
||||
if not re.match('(19|20)\d\d:\d\d', wallet):
|
||||
@@ -248,12 +244,12 @@ def scanupload(request, wallet=None):
|
||||
if multiple:
|
||||
for f in multiple:
|
||||
actual_saved.append( fs.save(f.name, content=f) )
|
||||
print(f'! - FORM scanupload multiple {actual_saved}')
|
||||
# print(f'! - FORM scanupload multiple {actual_saved}')
|
||||
filesaved = True
|
||||
|
||||
files = []
|
||||
dirs = []
|
||||
print(f'! - FORM scanupload - start {wallet} {dirpath}')
|
||||
# print(f'! - FORM scanupload - start {wallet} {dirpath}')
|
||||
try:
|
||||
for f in dirpath.iterdir():
|
||||
if f.is_dir():
|
||||
|
||||
Reference in New Issue
Block a user