diff options
-rw-r--r-- | localsettingsserver.py | 8 | ||||
-rw-r--r-- | parsers/survex.py | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/localsettingsserver.py b/localsettingsserver.py index 949da3c..f60decb 100644 --- a/localsettingsserver.py +++ b/localsettingsserver.py @@ -1,12 +1,16 @@ import sys sys.path.append("/home/expo/troggle") +# This is an example file. Copy it to localsettings.py, set the +# password and _don't_ check that file back to the repo as it exposes +# your/our password to the world! + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'troggle', # Or path to database file if using sqlite3. - 'USER': 'undemocracy', # Not used with sqlite3. - 'PASSWORD': 'aiGohsh5', # Not used with sqlite3. + 'USER': 'expo', # Not used with sqlite3. + 'PASSWORD': 'localpassword', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } diff --git a/parsers/survex.py b/parsers/survex.py index cbc91bd..3f490ea 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -183,6 +183,10 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines): survextitle = models.SurvexTitle(survexblock=survexblock, title=line.strip('"'), cave=survexblock.cave) survextitle.save() + elif cmd == "require": + # should we check survex version available for processing? + pass + elif cmd == "data": ls = line.lower().split() stardata = { "type":ls[0] } @@ -200,8 +204,10 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines): elif cmd == "fix": survexblock.MakeSurvexStation(line.split()[0]) + else: - assert cmd in [ "sd", "include", "units", "entrance", "data", "flags", "title", "export", "instrument", "calibrate", "set", "infer"], (cmd, line, survexblock) + if not cmd in [ "sd", "include", "units", "entrance", "data", "flags", "title", "export", "instrument", "calibrate", "set", "infer", "alias" ]: + print ("Unrecognised command in line:", cmd, line, survexblock) |