forked from expo/troggle
Update new management command for DB reset
Switch to content_type from mimetype Make DB reset not nuke so much Tidy logbook parser
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user