summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--databaseReset.py12
-rw-r--r--templates/tunnelfiles.html5
2 files changed, 13 insertions, 4 deletions
diff --git a/databaseReset.py b/databaseReset.py
index 9adfa4a..a4687cd 100644
--- a/databaseReset.py
+++ b/databaseReset.py
@@ -36,6 +36,15 @@ def reload_db():
user.is_superuser = True
user.save()
+def syncuser():
+ """Sync user - needed after reload"""
+ management.call_command('syncdb', interactive=False)
+ user = User.objects.create_user(expouser, expouseremail, expouserpass)
+ user.is_staff = True
+ user.is_superuser = True
+ user.save()
+
+
def make_dirs():
"""Make directories that troggle requires"""
#should also deal with permissions here.
@@ -147,7 +156,7 @@ class JobQueue():
self.results_order=[
"date","runlabel","reload", "caves", "people",
"logbooks", "scans", "QMs", "survex",
- "tunnel", "surveys", "test", "makedirs", "redirect" ]
+ "tunnel", "surveys", "test", "makedirs", "redirect", "syncuser" ]
for k in self.results_order:
self.results[k]=[]
self.tfile = "import_profile.json"
@@ -253,6 +262,7 @@ def usage():
writecaves - *disabled* (archaic?)
autologbooks - read in autologbooks (what are these?)
dumplogbooks - write out autologbooks (not working?)
+ syncuser - needed after reloading database rom SQL backup
test - testing...
and [runlabel] is an optional string identifying this run of the script
diff --git a/templates/tunnelfiles.html b/templates/tunnelfiles.html
index fbc74ea..843eefd 100644
--- a/templates/tunnelfiles.html
+++ b/templates/tunnelfiles.html
@@ -6,14 +6,13 @@
{% block content %}
-<h3>All Tunnel files</h3>
+<h3>All Tunnel files - references to wallets and survey scans</h3>
<table>
-<tr><th>File</th><th>Font</th><th>SurvexBlocks</th><th>Size</th><th>Paths</th><th>Scans folder</th><th>Scan files</th><th>Frames</th></tr>
+<tr><th>File</th><th>Font</th><th>Size</th><th>Paths</th><th>Scans folder</th><th>Scan files</th><th>Frames</th></tr>
{% for tunnelfile in tunnelfiles %}
<tr>
<td><a href="{% url "tunnelfile" tunnelfile.tunnelpath %}">{{tunnelfile.tunnelpath}}</a></td>
<td>{{tunnelfile.bfontcolours}}</td>
- <td></td>
<td>{{tunnelfile.filesize}}</td>
<td>{{tunnelfile.npaths}}</td>