mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
bugfix from rearranged model files
This commit is contained in:
parent
79bccade02
commit
a1c34f488d
@ -52,7 +52,7 @@ class SimpleTest(SimpleTestCase):
|
||||
def test_import_views_uploads(self):
|
||||
from troggle.core.views.uploads import dwgupload, scanupload
|
||||
def test_import_parsers_QMs(self):
|
||||
from troggle.core.models.caves import QM, Cave, LogbookEntry
|
||||
from troggle.core.models.logbooks import QM
|
||||
def test_import_parsers_people(self):
|
||||
from html import unescape
|
||||
|
||||
@ -62,7 +62,7 @@ class SimpleTest(SimpleTestCase):
|
||||
from django.utils.timezone import get_current_timezone, make_aware
|
||||
|
||||
from parsers.people import GetPersonExpeditionNameLookup
|
||||
from troggle.core.models.caves import Cave, LogbookEntry, PersonTrip
|
||||
from troggle.core.models.logbooks import LogbookEntry, PersonTrip
|
||||
from troggle.core.models.troggle import DataIssue, Expedition
|
||||
def test_import_core_views_caves(self):
|
||||
from django.conf import settings
|
||||
@ -73,7 +73,7 @@ class SimpleTest(SimpleTestCase):
|
||||
import troggle.core.views.expo
|
||||
from troggle.core.forms import (CaveAndEntranceFormSet, CaveForm,
|
||||
EntranceForm, EntranceLetterForm)
|
||||
from troggle.core.models.caves import (QM, Area, Cave, CaveAndEntrance,
|
||||
from troggle.core.models.caves import (Area, Cave, CaveAndEntrance,
|
||||
CaveSlug, Entrance,
|
||||
EntranceSlug, SurvexStation)
|
||||
from troggle.core.models.troggle import Expedition
|
||||
|
@ -21,6 +21,7 @@ from django.template import Context, loader
|
||||
from django.urls import reverse
|
||||
|
||||
import settings
|
||||
from troggle.core.models.logbooks import QM
|
||||
from troggle.core.models.survex import SurvexStation
|
||||
from troggle.core.models.troggle import (DataIssue, Expedition, Person,
|
||||
TroggleModel)
|
||||
|
@ -21,11 +21,9 @@ from django.template import Context, loader
|
||||
from django.urls import reverse
|
||||
|
||||
import settings
|
||||
from troggle.core.models.caves import (Area, Cave, CaveAndEntrance,
|
||||
Entrance)
|
||||
from troggle.core.models.survex import SurvexStation
|
||||
from troggle.core.models.troggle import (DataIssue, Expedition, Person,
|
||||
TroggleModel)
|
||||
PersonExpedition, TroggleModel)
|
||||
|
||||
'''The model declarations LogBookEntry, PersonTrip, QM
|
||||
'''
|
||||
@ -111,7 +109,7 @@ class QM(TroggleModel):
|
||||
"""This is based on qm.csv in trunk/expoweb/1623/204 which has the fields:
|
||||
"Number","Grade","Area","Description","Page reference","Nearest station","Completion description","Comment"
|
||||
"""
|
||||
cave = models.ForeignKey(Cave, related_name='QMs',blank=True, null=True,on_delete=models.SET_NULL )
|
||||
cave = models.ForeignKey('Cave', related_name='QMs',blank=True, null=True,on_delete=models.SET_NULL )
|
||||
block = models.ForeignKey('SurvexBlock', null=True,on_delete=models.SET_NULL) # only for QMs from survex files
|
||||
blockname=models.TextField(blank=True,null=True) # NB truncated copy of survexblock name with last char added
|
||||
expoyear = models.CharField(max_length=4,blank=True, null=True) # could change to datetime if logbooks similarly chnaged
|
||||
@ -130,7 +128,7 @@ class QM(TroggleModel):
|
||||
location_description = models.TextField(blank=True)
|
||||
nearest_station_description = models.CharField(max_length=400,blank=True, null=True)
|
||||
nearest_station_name = models.CharField(max_length=200,blank=True, null=True)
|
||||
nearest_station = models.ForeignKey(SurvexStation,blank=True, null=True,on_delete=models.SET_NULL)
|
||||
nearest_station = models.ForeignKey('SurvexStation',blank=True, null=True,on_delete=models.SET_NULL)
|
||||
area = models.CharField(max_length=100,blank=True, null=True)
|
||||
completion_description = models.TextField(blank=True,null=True)
|
||||
comment=models.TextField(blank=True,null=True)
|
||||
|
Loading…
Reference in New Issue
Block a user