diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-14 04:33:19 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-06-14 04:33:19 +0100 |
commit | af9743026e52081886d93575927b5a4c89c987cb (patch) | |
tree | 78ae4d412596bf74d2a42e86ce3f630f2eab4224 | |
parent | 9b44731c338a14e45b9a6f757cdaec8bf67db77d (diff) | |
download | troggle-af9743026e52081886d93575927b5a4c89c987cb.tar.gz troggle-af9743026e52081886d93575927b5a4c89c987cb.tar.bz2 troggle-af9743026e52081886d93575927b5a4c89c987cb.zip |
[svn] Added beginnings subcaves parser. This required importing more information from cavetab, namely the location where the main cave page appeared on the old expo website.
-rw-r--r-- | expo/models.py | 3 | ||||
-rw-r--r-- | parsers/cavetab.py | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/expo/models.py b/expo/models.py index fd7c873..28712b5 100644 --- a/expo/models.py +++ b/expo/models.py @@ -351,7 +351,8 @@ class Cave(TroggleModel): length = models.CharField(max_length=100,blank=True,null=True)
depth = models.CharField(max_length=100,blank=True,null=True)
extent = models.CharField(max_length=100,blank=True,null=True)
- survex_file = models.CharField(max_length=100,blank=True,null=True) #should be filefield, need to fix parser first
+ survex_file = models.CharField(max_length=100,blank=True,null=True)
+ description_file = models.CharField(max_length=200,blank=True,null=True)
#href = models.CharField(max_length=100)
diff --git a/parsers/cavetab.py b/parsers/cavetab.py index dcc8fcc..d0fb052 100644 --- a/parsers/cavetab.py +++ b/parsers/cavetab.py @@ -181,6 +181,13 @@ def LoadCaveTab(): addToDefaultArgs(Extent, "extent")
addToDefaultArgs(SurvexFile, "survex_file")
addToDefaultArgs(Notes, "notes")
+
+ #The following adds the legacy_file_path. This is always in either Autogen file or Link file
+ for header in (AutogenFile,LinkFile):
+ if line[header]:
+ addToDefaultArgs(header,"description_file")
+ break
+
#The following checks if this cave is non-public i.e. we don't have rights to display it online.
#Noinfo was the name of the old password protected directory, so if it has that then we will
|