summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/TESTS/tests.py4
-rw-r--r--core/admin.py2
-rw-r--r--core/forms.py2
-rw-r--r--core/views.py8
-rw-r--r--core/views/__init__.py0
-rw-r--r--core/views/caves.py (renamed from core/views_caves.py)0
-rw-r--r--core/views/expo.py (renamed from core/views_expo.py)6
-rw-r--r--core/views/logbooks.py (renamed from core/views_logbooks.py)0
-rw-r--r--core/views/other.py (renamed from core/views_other.py)6
-rw-r--r--core/views/persons.py (renamed from core/views_logbooks2.py)0
-rw-r--r--core/views/statistics.py (renamed from core/views_statistics.py)0
-rw-r--r--core/views/survex.py (renamed from core/views_survex.py)0
-rw-r--r--core/views/surveys.py (renamed from core/view_surveys.py)2
13 files changed, 11 insertions, 19 deletions
diff --git a/core/TESTS/tests.py b/core/TESTS/tests.py
index 852fb08..96d726f 100644
--- a/core/TESTS/tests.py
+++ b/core/TESTS/tests.py
@@ -40,7 +40,7 @@ class SimpleTest(SimpleTestCase):
import troggle.core.models_caves as models_caves
import troggle.core.models_survex as models_survex
from troggle.parsers.people import GetPersonExpeditionNameLookup
- from troggle.core.views_caves import MapLocations
+ from troggle.core.views.caves import MapLocations
def test_import_parsers_QMs(self):
from troggle.core.models_caves import QM, Cave, LogbookEntry
from utils import save_carefully
@@ -56,7 +56,7 @@ class SimpleTest(SimpleTestCase):
def test_import_core_views_caves(self):
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
- import troggle.core.views_expo
+ import troggle.core.views.expo
from troggle.core.models import Expedition
from troggle.core.models_caves import CaveSlug, Cave, CaveAndEntrance, QM, EntranceSlug, Entrance, Area, SurvexStation
from troggle.core.forms import CaveForm, CaveAndEntranceFormSet, VersionControlCommentForm, EntranceForm, EntranceLetterForm
diff --git a/core/admin.py b/core/admin.py
index 3cb8d86..5f62fbd 100644
--- a/core/admin.py
+++ b/core/admin.py
@@ -4,7 +4,7 @@ from django.forms import ModelForm
from django.http import HttpResponse
from django.core import serializers
-from troggle.core.views_other import downloadLogbook
+from troggle.core.views.other import downloadLogbook
from troggle.core.models import Person, PersonExpedition, Expedition, DataIssue
from troggle.core.models_caves import Cave, Area, Entrance, CaveAndEntrance, LogbookEntry, PersonTrip, QM
from troggle.core.models_survex import SurvexBlock, SurvexPersonRole, SurvexStation, ScansFolder, SingleScan
diff --git a/core/forms.py b/core/forms.py
index f86796a..d3941b0 100644
--- a/core/forms.py
+++ b/core/forms.py
@@ -156,7 +156,7 @@ def get_name(pe):
return pe.person.first_name
class UploadFileForm(forms.Form):
- """Only called by views_others.newFile() whhich seems to be only about logbook files.
+ """Only called by views.others.newFile() whhich seems to be only about logbook files.
"""
# Because this has EXECUTABLE statements in its signature (the fields) they get
# executed when this module is LOADED. Which barfs horribly.
diff --git a/core/views.py b/core/views.py
deleted file mode 100644
index b74b709..0000000
--- a/core/views.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# primary namespace
-
-from . import view_surveys
-from . import views_caves
-from . import views_survex
-from . import views_logbooks
-from . import views_other
-from . import views_statistics
diff --git a/core/views/__init__.py b/core/views/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/core/views/__init__.py
diff --git a/core/views_caves.py b/core/views/caves.py
index 390d8f7..390d8f7 100644
--- a/core/views_caves.py
+++ b/core/views/caves.py
diff --git a/core/views_expo.py b/core/views/expo.py
index 49f8bc7..4ca6f22 100644
--- a/core/views_expo.py
+++ b/core/views/expo.py
@@ -15,7 +15,7 @@ import django.forms as forms
from troggle.helper import login_required_if_public
from troggle.core.models_caves import Cave
-import troggle.core.views_caves
+import troggle.core.views.caves
import troggle.settings as settings
'''Formerly a separate package 'flatpages' written by Martin Green 2011.
@@ -69,7 +69,7 @@ def expowebpage(request, expowebpath, path):
if m:
preheader, headerattrs, head, postheader, bodyattrs, body, postbody = m.groups()
else:
- return HttpResponse(html + "HTML Parsing failure: Page could not be split into header and body: failed in expowebpage in views_expo.py")
+ return HttpResponse(html + "HTML Parsing failure: Page could not be split into header and body: failed in expowebpage in views.expo.py")
m = re.search(rb"<title>(.*)</title>", head, re.DOTALL + re.IGNORECASE)
if m:
title, = m.groups()
@@ -181,7 +181,7 @@ def getmimetype(path):
def editexpopage(request, path):
try:
r = Cave.objects.get(url = path)
- return troggle.core.views_caves.editCave(request, r.cave.slug)
+ return troggle.core.views.caves.editCave(request, r.cave.slug)
except Cave.DoesNotExist:
pass
diff --git a/core/views_logbooks.py b/core/views/logbooks.py
index 1ef7838..1ef7838 100644
--- a/core/views_logbooks.py
+++ b/core/views/logbooks.py
diff --git a/core/views_other.py b/core/views/other.py
index 5b9303c..83acc4c 100644
--- a/core/views_other.py
+++ b/core/views/other.py
@@ -14,7 +14,7 @@ from troggle.core.models_caves import LogbookEntry, QM, Cave, PersonTrip
from troggle.helper import login_required_if_public
from troggle.core.forms import UploadFileForm
-print("** importing troggle/core/views_other.py")
+print("** importing troggle/core/views.other.py")
"""Utility functions and code to serve the control panel and individual user's
progress and task list (deprecated as we do not have individual user login).
@@ -140,7 +140,7 @@ def ajax_QM_number(request):
return HttpResponse(res)
-print(" - newFile() is next in troggle/core/views_other.py")
+print(" - newFile() is next in troggle/core/views.other.py")
@login_required_if_public
def newFile(request, pslug = None):
@@ -194,4 +194,4 @@ def delFile(f):
lbe.delete()
os.remove(lbe.filename)
-print("** Finished importing troggle/core/views_other.py") \ No newline at end of file
+print("** Finished importing troggle/core/views.other.py") \ No newline at end of file
diff --git a/core/views_logbooks2.py b/core/views/persons.py
index a38806a..a38806a 100644
--- a/core/views_logbooks2.py
+++ b/core/views/persons.py
diff --git a/core/views_statistics.py b/core/views/statistics.py
index 3102d51..3102d51 100644
--- a/core/views_statistics.py
+++ b/core/views/statistics.py
diff --git a/core/views_survex.py b/core/views/survex.py
index 0c05697..0c05697 100644
--- a/core/views_survex.py
+++ b/core/views/survex.py
diff --git a/core/view_surveys.py b/core/views/surveys.py
index 2742229..63eaf2b 100644
--- a/core/view_surveys.py
+++ b/core/views/surveys.py
@@ -9,7 +9,7 @@ from django.shortcuts import render
from django.http import HttpResponse, Http404
from troggle.core.models_survex import ScansFolder, SingleScan, SurvexBlock, TunnelFile
-from .views_expo import getmimetype
+from troggle.core.views.expo import getmimetype
import parsers.surveys
'''Some of these views serve files as binary blobs, and simply set the mime type based on the file extension,