move models_caves to models/caves.py

This commit is contained in:
Philip Sargent 2021-04-13 00:47:17 +01:00
parent 5b3b0e67e9
commit 957169d9aa
17 changed files with 20 additions and 20 deletions

View File

@ -29,7 +29,7 @@ class SimpleTest(SimpleTestCase):
def test_import_TroggleModel(self):
from troggle.core.models.troggle import TroggleModel
def test_import_Cave(self):
from troggle.core.models_caves import Cave
from troggle.core.models.caves import Cave
def test_import_parsers_surveys(self):
from PIL import Image
from troggle.core.utils import save_carefully
@ -37,12 +37,12 @@ class SimpleTest(SimpleTestCase):
def test_import_parsers_survex(self):
import troggle.settings as settings
import troggle.core.models.troggle as models
import troggle.core.models_caves as models_caves
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
def test_import_parsers_QMs(self):
from troggle.core.models_caves import QM, Cave, LogbookEntry
from troggle.core.models.caves import QM, Cave, LogbookEntry
def test_import_parsers_people(self):
from html.parser import HTMLParser
from unidecode import unidecode
@ -50,14 +50,14 @@ class SimpleTest(SimpleTestCase):
from django.template.defaultfilters import slugify
from django.utils.timezone import get_current_timezone, make_aware
from troggle.core.models.troggle import DataIssue, Expedition
from troggle.core.models_caves import Cave, LogbookEntry, PersonTrip
from troggle.core.models.caves import Cave, LogbookEntry, PersonTrip
from parsers.people import GetPersonExpeditionNameLookup
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
from troggle.core.models.troggle import Expedition
from troggle.core.models_caves import CaveSlug, Cave, CaveAndEntrance, QM, EntranceSlug, Entrance, Area, SurvexStation
from troggle.core.models.caves import CaveSlug, Cave, CaveAndEntrance, QM, EntranceSlug, Entrance, Area, SurvexStation
from troggle.core.forms import CaveForm, CaveAndEntranceFormSet, VersionControlCommentForm, EntranceForm, EntranceLetterForm
from troggle.core.views.login import login_required_if_public
from django.contrib.auth.decorators import login_required

View File

@ -6,7 +6,7 @@ from django.core import serializers
from troggle.core.views.other import downloadLogbook
from troggle.core.models.troggle import Person, PersonExpedition, Expedition, DataIssue
from troggle.core.models_caves import Cave, Area, Entrance, CaveAndEntrance, LogbookEntry, PersonTrip, QM
from troggle.core.models.caves import Cave, Area, Entrance, CaveAndEntrance, LogbookEntry, PersonTrip, QM
from troggle.core.models_survex import SurvexBlock, SurvexPersonRole, SurvexStation, ScansFolder, SingleScan
'''This code significantly adds to the capabilities of the Django Management control panel for Troggle data.

View File

@ -9,7 +9,7 @@ from django.contrib.admin.widgets import AdminDateWidget
#from tinymce.widgets import TinyMCE
from troggle.core.models.troggle import Person, PersonExpedition, Expedition
from troggle.core.models_caves import Cave, LogbookEntry, QM, Entrance, CaveAndEntrance
from troggle.core.models.caves import Cave, LogbookEntry, QM, Entrance, CaveAndEntrance
class CaveForm(ModelForm):
underground_description = forms.CharField(required = False, widget=forms.Textarea())

View File

@ -3,7 +3,7 @@ from django.utils.html import conditional_escape
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
from django.conf import settings
from troggle.core.models_caves import LogbookEntry, QM, Cave
from troggle.core.models.caves import LogbookEntry, QM, Cave
import re, urllib.parse
register = template.Library()

View File

@ -18,7 +18,7 @@ import troggle.settings as settings
#import troggle.core.models as models
from troggle.core.views import expo
from troggle.core.models.troggle import Expedition, DataIssue
from troggle.core.models_caves import CaveSlug, Cave, CaveAndEntrance, QM, EntranceSlug, Entrance, Area, SurvexStation, GetCaveLookup
from troggle.core.models.caves import CaveSlug, Cave, CaveAndEntrance, QM, EntranceSlug, Entrance, Area, SurvexStation, GetCaveLookup
from troggle.core.forms import CaveForm, CaveAndEntranceFormSet, VersionControlCommentForm, EntranceForm, EntranceLetterForm
from .login import login_required_if_public

View File

@ -14,7 +14,7 @@ from django.contrib import admin
import django.forms as forms
from .login import login_required_if_public
from troggle.core.models_caves import Cave
from troggle.core.models.caves import Cave
import troggle.core.views.caves
import troggle.settings as settings

View File

@ -16,7 +16,7 @@ from django.views.generic.list import ListView
from troggle.core.forms import getTripForm # , get_name, PersonForm
from troggle.core.models.troggle import Expedition, Person, PersonExpedition
from troggle.core.utils import TROG
from troggle.core.models_caves import LogbookEntry, PersonTrip
from troggle.core.models.caves import LogbookEntry, PersonTrip
from troggle.core.models_survex import SurvexBlock
from .login import login_required_if_public
from troggle.parsers.logbooks import LoadLogbookForExpedition

View File

@ -10,7 +10,7 @@ from django.template import Context, loader
import troggle.parsers.imports
from troggle.core.models.troggle import Expedition, Person, PersonExpedition
from troggle.core.models_caves import LogbookEntry, QM, Cave, PersonTrip
from troggle.core.models.caves import LogbookEntry, QM, Cave, PersonTrip
from .login import login_required_if_public
from troggle.core.forms import UploadFileForm

View File

@ -12,7 +12,7 @@ from django.utils import timezone
#from django.views.generic.list import ListView
from troggle.core.models.troggle import Expedition, Person, PersonExpedition, DataIssue
from troggle.core.models_caves import Cave, LogbookEntry
from troggle.core.models.caves import Cave, LogbookEntry
from troggle.core.models_survex import SurvexBlock
import troggle.settings as settings

View File

@ -16,7 +16,7 @@ import troggle.settings as settings
import parsers.survex
from troggle.core.models.troggle import Expedition, Person, PersonExpedition
from troggle.core.models_survex import SurvexBlock, SurvexPersonRole, SurvexFile, SurvexDirectory
from troggle.core.models_caves import Cave, PersonTrip, LogbookEntry
from troggle.core.models.caves import Cave, PersonTrip, LogbookEntry
from troggle.parsers.people import GetPersonExpeditionNameLookup
survexdatasetpath = Path(settings.SURVEX_DATA)

View File

@ -44,7 +44,7 @@ from django.contrib.auth.models import User
from django.db import transaction
from troggle.core.utils import get_process_memory
from troggle.core.models_caves import Cave, Entrance
from troggle.core.models.caves import Cave, Entrance
from troggle.parsers.imports import import_caves, import_people, import_surveyscans, \
import_logbooks, import_QMs, import_survex, import_loadpos, import_drawingsfiles
import troggle.logbooksdump

View File

@ -18,7 +18,7 @@ from django.contrib.auth.models import User
from django.http import HttpResponse
from django.urls import reverse
from troggle.core.models_caves import Cave, Entrance
from troggle.core.models.caves import Cave, Entrance
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def import_auto_logbooks():

View File

@ -6,7 +6,7 @@ from datetime import date
from django.conf import settings
from troggle.core.models.troggle import DataIssue
from troggle.core.models_caves import QM, Cave, LogbookEntry
from troggle.core.models.caves import QM, Cave, LogbookEntry
from troggle.core.utils import save_carefully

View File

@ -5,7 +5,7 @@ from django.conf import settings
from django.db import transaction
from troggle.core.models.troggle import DataIssue
from troggle.core.models_caves import Area, Cave, Entrance, CaveSlug, EntranceSlug, CaveAndEntrance
from troggle.core.models.caves import Area, Cave, Entrance, CaveSlug, EntranceSlug, CaveAndEntrance
'''Reads all the cave description data by parsing the xml files (stored as e.g. :EXPOWEB:/cave-data/1623-161.html )
and creating the various Cave, Entrance and necessary Area objects.

View File

@ -12,7 +12,7 @@ from django.utils.timezone import get_current_timezone, make_aware
from troggle.core.models.troggle import DataIssue, Expedition
from troggle.core.utils import TROG, save_carefully
from troggle.core.models_caves import Cave, LogbookEntry, PersonTrip, GetCaveLookup
from troggle.core.models.caves import Cave, LogbookEntry, PersonTrip, GetCaveLookup
from parsers.people import GetPersonExpeditionNameLookup
#

View File

@ -13,7 +13,7 @@ from django.utils.timezone import make_aware
import troggle.settings as settings
import troggle.core.models as models
import troggle.core.models_caves as models_caves
import troggle.core.models.caves as models_caves
import troggle.core.models_survex as models_survex
from troggle.core.utils import get_process_memory, chaosmonkey
from troggle.parsers.people import GetPersonExpeditionNameLookup