summaryrefslogtreecommitdiffstats
path: root/databaseReset.py
diff options
context:
space:
mode:
authorSam Wenham <sam@wenhams.co.uk>2019-03-30 13:58:38 +0000
committerSam Wenham <sam@wenhams.co.uk>2019-03-30 13:58:38 +0000
commita4532a29da6c2a92553daeafbd3c7eca5b42f861 (patch)
tree49efb937e79620d1931ba21db86ca17a1fba36c7 /databaseReset.py
parent705dd51f30bb764eda6efc480d97e2121ebab09f (diff)
downloadtroggle-a4532a29da6c2a92553daeafbd3c7eca5b42f861.tar.gz
troggle-a4532a29da6c2a92553daeafbd3c7eca5b42f861.tar.bz2
troggle-a4532a29da6c2a92553daeafbd3c7eca5b42f861.zip
Update new management command for DB reset
Switch to content_type from mimetype Make DB reset not nuke so much Tidy logbook parser
Diffstat (limited to 'databaseReset.py')
-rw-r--r--databaseReset.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/databaseReset.py b/databaseReset.py
index c296274..7a5d0fa 100644
--- a/databaseReset.py
+++ b/databaseReset.py
@@ -109,10 +109,10 @@ def import_auto_logbooks():
for lbe in troggle.core.models.LogbookEntry.objects.all():
lbe.delete()
for expedition in troggle.core.models.Expedition.objects.all():
- directory = os.path.join(settings.EXPOWEB,
- "years",
- expedition.year,
- "autologbook")
+ directory = os.path.join(settings.EXPOWEB,
+ "years",
+ expedition.year,
+ "autologbook")
for root, dirs, filenames in os.walk(directory):
for filename in filenames:
print(os.path.join(root, filename))
@@ -195,9 +195,9 @@ if __name__ == "__main__":
elif "scans" in sys.argv:
import_surveyscans()
elif "caves" in sys.argv:
- reload_db()
- make_dirs()
- pageredirects()
+ # reload_db()
+ # make_dirs()
+ # pageredirects()
import_caves()
elif "people" in sys.argv:
import_people()
@@ -218,14 +218,14 @@ if __name__ == "__main__":
import_descriptions()
parse_descriptions()
elif "survex" in sys.argv:
- management.call_command('syncdb', interactive=False) # this sets the path so that import settings works in import_survex
+ # management.call_command('syncdb', interactive=False) # this sets the path so that import settings works in import_survex
import_survex()
elif "survexpos" in sys.argv:
- management.call_command('syncdb', interactive=False) # this sets the path so that import settings works in import_survex
+ # management.call_command('syncdb', interactive=False) # this sets the path so that import settings works in import_survex
import parsers.survex
parsers.survex.LoadPos()
elif "logbooks" in sys.argv:
- management.call_command('syncdb', interactive=False) # this sets the path so that import settings works in import_survex
+ # management.call_command('syncdb', interactive=False) # this sets the path so that import settings works in import_survex
import_logbooks()
elif "autologbooks" in sys.argv:
import_auto_logbooks()