summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.txt5
-rw-r--r--databaseReset.py2
-rw-r--r--parsers/logbooks.py4
-rw-r--r--templates/base.html3
4 files changed, 13 insertions, 1 deletions
diff --git a/README.txt b/README.txt
index 2913653..c452750 100644
--- a/README.txt
+++ b/README.txt
@@ -25,12 +25,17 @@ If you want to work on the source code and be able to commit, you will need to u
Next, you need to fill in your local settings. Copy either localsettingsubuntu.py or localsettingsserver.py to a new file called localsettings.py. Follow the instructions contained in the file to fill out your settings.
+
Setting up tables and importing legacy data
------------------------------------------
Run "python databaseReset.py reset" from the troggle directory.
Once troggle is running, you can also log in and then go to "Import / export" data under "admin" on the menu.
+Adding a new year/expedition requires adding a column to the
+noinfo/folk.csv table - a year doesn't exist until that is done.
+
+
Running a Troggle server
------------------------
For high volume use, Troggle should be run using a web server like apache. However, a quick way to get started is to use the development server built into Django.
diff --git a/databaseReset.py b/databaseReset.py
index a14a44d..9e6aa06 100644
--- a/databaseReset.py
+++ b/databaseReset.py
@@ -191,6 +191,8 @@ if __name__ == "__main__":
make_dirs()
pageredirects()
import_caves()
+ elif "people" in sys.argv:
+ import_people()
elif "QMs" in sys.argv:
import_QMs()
elif "tunnel" in sys.argv:
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index 9c5b106..4180345 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -253,6 +253,8 @@ def Parseloghtml03(year, expedition, txt):
EnterLogIntoDbase(date = ldate, place = tripcave, title = triptitle, text = ltriptext, trippeople=trippeople, expedition=expedition, logtime_underground=0)
yearlinks = [
+# ("2013", "2013/logbook.html", Parseloghtmltxt),
+ ("2012", "2012/logbook.html", Parseloghtmltxt),
("2011", "2011/logbook.html", Parseloghtmltxt),
("2010", "2010/logbook.html", Parselogwikitxt),
("2009", "2009/2009logbook.txt", Parselogwikitxt),
@@ -323,6 +325,8 @@ def LoadLogbooks():
#yearlinks = [ ("1996", "1996/log.htm", Parseloghtml01),] # overwrite
for year, lloc, parsefunc in yearlinks:
+ # This will not work until the corresponding year exists in the database.
+ # In 2012 this needed noscript/folk.csv to be updated first.
expedition = models.Expedition.objects.filter(year = year)[0]
fin = open(os.path.join(expowebbase, lloc))
txt = fin.read().decode("latin1")
diff --git a/templates/base.html b/templates/base.html
index 83db9bf..fda3617 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -16,7 +16,7 @@
<body onLoad="contentHeight();">
<div id="header">
- <h1>CUCC Expeditions to Austria: 1976 - 2012</h1>
+ <h1>CUCC Expeditions to Austria: 1976 - 2013</h1>
<div id="editLinks"> {% block loginInfo %}
<a href="{{settings.EXPOWEB_URL}}">Website home</a> |
{% if user.username %}
@@ -38,6 +38,7 @@
<a href="{% url survexcavessingle 161 %}">161</a> |
<a href="{% url survexcavessingle 204 %}">204</a> |
<a href="{% url survexcavessingle 258 %}">258</a> |
+ <a href="{% url expedition 2011 %}">Expo2011</a> |
<a href="{% url expedition 2012 %}">Expo2012</a> |
<a href="{% url expedition 2013 %}">Expo2013</a> |