diff options
author | goatchurch <goatchurch@ubuntu.clocksoft.dom> | 2009-09-11 23:56:47 +0100 |
---|---|---|
committer | goatchurch <goatchurch@ubuntu.clocksoft.dom> | 2009-09-11 23:56:47 +0100 |
commit | 12cf3a6d534e5038b5d78b11a03cef2b81f5f852 (patch) | |
tree | 30d6f4e0891ae28750ca9dd97c74432c17683384 /core/models_survex.py | |
parent | b80168c099b5805dfc9c1fee576d00cabc31e2d2 (diff) | |
download | troggle-12cf3a6d534e5038b5d78b11a03cef2b81f5f852.tar.gz troggle-12cf3a6d534e5038b5d78b11a03cef2b81f5f852.tar.bz2 troggle-12cf3a6d534e5038b5d78b11a03cef2b81f5f852.zip |
tunnelfiles scheme added
Diffstat (limited to 'core/models_survex.py')
-rw-r--r-- | core/models_survex.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/models_survex.py b/core/models_survex.py index f3fc61d..9fd23c4 100644 --- a/core/models_survex.py +++ b/core/models_survex.py @@ -113,6 +113,8 @@ class SurvexBlock(models.Model): ss.save()
return ss
+ def DayIndex(self):
+ return list(self.expeditionday.survexblock_set.all()).index(self)
class SurvexTitle(models.Model):
@@ -143,7 +145,8 @@ class SurvexPersonRole(models.Model): person = models.ForeignKey('Person', blank=True, null=True)
personexpedition = models.ForeignKey('PersonExpedition', blank=True, null=True)
persontrip = models.ForeignKey('PersonTrip', blank=True, null=True)
-
+ expeditionday = models.ForeignKey("ExpeditionDay", null=True)
+
def __unicode__(self):
return unicode(self.person) + " - " + unicode(self.survexblock) + " - " + unicode(self.nrole)
@@ -164,4 +167,11 @@ class SurvexScanSingle(models.Model): return urlparse.urljoin(settings.URL_ROOT, reverse('surveyscansingle', kwargs={"path":re.sub("#", "%23", self.survexscansfolder.walletname), "file":self.name}))
-
+class TunnelFile(models.Model):
+ tunnelpath = models.CharField(max_length=200)
+ bfontcolours = models.BooleanField()
+ survexscans = models.ManyToManyField("SurvexScanSingle")
+ survexblocks = models.ManyToManyField("SurvexBlock")
+ tunnelcontains = models.ManyToManyField("TunnelFile") # case when its a frame type
+
+
\ No newline at end of file |