From f131509c565edef455a5a9d89f176081d56038cc Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Mon, 20 Jul 2020 22:53:26 +0100 Subject: [PATCH] 3dtopos to survexpos + comments --- .gitignore | 4 + core/views_other.py | 15 +- databaseReset.py | 7 +- lines-of-python.txt | 29 +-- lines-of-templates.txt | 2 +- localsettingsWSL.py | 2 +- parsers/survex.py | 3 + troggle-inspectdb.py | 544 +++++++++++++++++++++++++++++++++++++++++ wsgi.py | 2 +- 9 files changed, 578 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 8f5e248..f060133 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,7 @@ troggle-inspectdb.py core/migrations/0001_initial.py flatpages/migrations/0001_initial.py _16230.svx +_1623.3d +_1623.pos +_1623.err +diffsettings.txt diff --git a/core/views_other.py b/core/views_other.py index 8cb026a..10c1ec7 100644 --- a/core/views_other.py +++ b/core/views_other.py @@ -16,6 +16,13 @@ from troggle.core.forms import UploadFileForm print("** importing troggle/core/views_other.py") +"""Utility functions and code to serve the control panel and individual user's +progress and task list (deprecated as we do not have individual user login). + +Also has code to download a logbook in a choice of formats (why?!) and to +download all QMs (not working) +""" + def showrequest(request): return HttpResponse(request.GET) @@ -29,8 +36,6 @@ def frontpage(request): #from django.contrib.admin.templatetags import log return render(request,'frontpage.html', locals()) -print(" - controlPanel() is next in troggle/core/views_other.py") - def controlPanel(request): jobs_completed=[] @@ -54,8 +59,6 @@ def controlPanel(request): return render(request,'controlPanel.html', {'caves':Cave.objects.all(),'expeditions':Expedition.objects.all(),'jobs_completed':jobs_completed}) -print(" - downloadLogbook() is next in troggle/core/views_other.py") - def downloadLogbook(request,year=None,extension=None,queryset=None): @@ -89,8 +92,6 @@ def downloadLogbook(request,year=None,extension=None,queryset=None): response.write(t.render(c)) return response -print(" - downloadQMs() is next in troggle/core/views_other.py") - def downloadQMs(request): # Note to self: use get_cave method for the below @@ -126,8 +127,6 @@ def ajax_QM_number(request): return HttpResponse(res) -print(" - logbook_entry_suggestions() is next in troggle/core/views_other.py") - def logbook_entry_suggestions(request): """ diff --git a/databaseReset.py b/databaseReset.py index 9034ce9..81aa529 100644 --- a/databaseReset.py +++ b/databaseReset.py @@ -303,8 +303,8 @@ def usage(): logbooks - read in the logbooks QMs - read in the QM csv files (older caves only) scans - the survey scans in all the wallets (must run before survex) - survex - read in the survex files - all the survex blocks and entrances x/y/z drawings - read in the Tunnel & Therion files - which scans the survey scans too + survex - read in the survex files - all the survex blocks and entrances x/y/z autologbooks - Not used. read in autologbooks (what are these?) dumplogbooks - Not used. write out autologbooks (not working?) @@ -336,14 +336,11 @@ if __name__ == "__main__": jq.enq("reinit",reinit_db) elif "test" in sys.argv: jq.enq("caves",import_caves) - import_subcaves() - #jq.enq("people",import_people) - #jq.run_now_django_tests(2) + jq.enq("people",import_people) elif "test2" in sys.argv: jq.enq("QMs",import_QMs) jq.enq("drawings",import_drawingsfiles) jq.enq("survex",import_survex) - jq.enq("drawings",import_drawingsfiles) elif "caves" in sys.argv: jq.enq("caves",import_caves) elif "logbooks" in sys.argv: diff --git a/lines-of-python.txt b/lines-of-python.txt index 648da5c..317deb6 100644 --- a/lines-of-python.txt +++ b/lines-of-python.txt @@ -2,42 +2,43 @@ 4 ./flatpages/admin.py 6 ./core/templatetags/link.py 6 ./core/views.py +6 ./manage.py 8 ./core/templatetags/csrffaker.py 10 ./flatpages/models.py +10 ./helper/__init__.py 10 ./wsgi.py -14 ./helper/__init__.py -16 ./manage.py 26 ./core/management/commands/reset_db.py 26 ./export/toqms.py 33 ./localsettingswindows.py 37 ./localsettingsubuntu.py 38 ./profiles/urls.py 38 ./profiles/utils.py +39 ./localsettings-expo-live.py 39 ./localsettingsdocker.py 39 ./localsettingsserver.py 41 ./localsettingspotatohut.py -43 ./middleware.py +41 ./middleware.py +44 ./dump.py 48 ./core/templatetags/survex_markup.py 48 ./parsers/imports.py 48 ./parsers/subcaves.py -54 ./dump.py -58 ./reset-django.py -69 ./logbooksdump.py +52 ./reset-django.py +63 ./logbooksdump.py +68 ./urls.py +71 ./core/TESTS/tests.py +73 ./localsettings.py +73 ./localsettingsWSL.py 73 ./settings.py 78 ./core/views_statistics.py -79 ./urls.py -80 ./localsettings.py -83 ./localsettingsWSL.py 97 ./core/forms.py 97 ./core/view_surveys.py 98 ./core/admin.py 102 ./parsers/people.py 105 ./parsers/QMs.py -108 ./core/TESTS/tests.py 124 ./core/templatetags/wiki_markup.py 142 ./core/models_survex.py +144 ./utils.py 148 ./parsers/surveys.py -153 ./utils.py 164 ./flatpages/views.py 164 ./modelviz.py 170 ./core/models.py @@ -46,9 +47,9 @@ 247 ./parsers/caves.py 262 ./core/views_survex.py 276 ./profiles/views.py -305 ./databaseReset.py +291 ./databaseReset.py 401 ./core/views_caves.py 497 ./parsers/logbooks.py 593 ./core/models_caves.py -1059 ./parsers/survex.py -6833 +1042 ./parsers/survex.py +6729 diff --git a/lines-of-templates.txt b/lines-of-templates.txt index 55cce9d..31b2790 100644 --- a/lines-of-templates.txt +++ b/lines-of-templates.txt @@ -26,8 +26,8 @@ 17 ./templates/editcave2.html 19 ./templates/cavemillenial.html 19 ./templates/registration/activate.html -20 ./templates/cavebase.html 20 ./templates/cave_qms.html +20 ./templates/cavebase.html 20 ./templates/plainbase.html 21 ./templates/logbook2005style.html 24 ./README/index.html diff --git a/localsettingsWSL.py b/localsettingsWSL.py index 109037d..1934e55 100644 --- a/localsettingsWSL.py +++ b/localsettingsWSL.py @@ -47,7 +47,7 @@ DEBUG = True # executables: CAVERN = 'cavern' -THREEDTOPOS = '3dtopos' +THREEDTOPOS = 'survexport --pos' DATABASES = { 'default': { diff --git a/parsers/survex.py b/parsers/survex.py index f058583..021244e 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -1165,6 +1165,9 @@ def FindAndLoadSurvex(survexblockroot): svx_load.survexdict[survexfileroot.survexdirectory] = [] svx_load.survexdict[survexfileroot.survexdirectory].append(survexfileroot) svx_load.svxdirs[""] = survexfileroot.survexdirectory + + # This next should be rewritten to use a generator so that only one + # line is held in memory at a time: with open(collatefilename, "r") as fcollate: svxlines = fcollate.read().splitlines() #---------------------------------------------------------------- diff --git a/troggle-inspectdb.py b/troggle-inspectdb.py index e77c5d9..266077a 100644 --- a/troggle-inspectdb.py +++ b/troggle-inspectdb.py @@ -1,9 +1,12 @@ * importing troggle/settings.py * importing troggle/localsettings.py + + finished importing troggle/localsettings.py + finished importing troggle/settings.py * importing troggle/settings.py + finished importing troggle/settings.py ** importing troggle/core/views_other.py + - newFile() is next in troggle/core/views_other.py +** Finished importing troggle/core/views_other.py # This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order @@ -14,3 +17,544 @@ from __future__ import unicode_literals from django.db import models + + +class AuthGroup(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + name = models.CharField(unique=True, max_length=80) + + class Meta: + managed = False + db_table = 'auth_group' +# Unable to inspect table 'auth_group_permissions' +# The error was: list index out of range + + +class AuthPermission(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + content_type = models.ForeignKey('DjangoContentType', models.DO_NOTHING) + codename = models.CharField(max_length=100) + name = models.CharField(max_length=255) + + class Meta: + managed = False + db_table = 'auth_permission' + unique_together = (('content_type', 'codename'),) + + +class AuthUser(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + password = models.CharField(max_length=128) + last_login = models.DateTimeField(blank=True, null=True) + is_superuser = models.BooleanField() + first_name = models.CharField(max_length=30) + last_name = models.CharField(max_length=30) + email = models.CharField(max_length=254) + is_staff = models.BooleanField() + is_active = models.BooleanField() + date_joined = models.DateTimeField() + username = models.CharField(unique=True, max_length=150) + + class Meta: + managed = False + db_table = 'auth_user' +# Unable to inspect table 'auth_user_groups' +# The error was: list index out of range +# Unable to inspect table 'auth_user_user_permissions' +# The error was: list index out of range + + +class CoreArea(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + short_name = models.CharField(max_length=100) + name = models.CharField(max_length=200, blank=True, null=True) + description = models.TextField(blank=True, null=True) + parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_area' + + +class CoreCave(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + official_name = models.CharField(max_length=160) + kataster_code = models.CharField(max_length=20, blank=True, null=True) + kataster_number = models.CharField(max_length=10, blank=True, null=True) + unofficial_number = models.CharField(max_length=60, blank=True, null=True) + explorers = models.TextField(blank=True, null=True) + underground_description = models.TextField(blank=True, null=True) + equipment = models.TextField(blank=True, null=True) + references = models.TextField(blank=True, null=True) + survey = models.TextField(blank=True, null=True) + kataster_status = models.TextField(blank=True, null=True) + underground_centre_line = models.TextField(blank=True, null=True) + notes = models.TextField(blank=True, null=True) + length = models.CharField(max_length=100, blank=True, null=True) + depth = models.CharField(max_length=100, blank=True, null=True) + extent = models.CharField(max_length=100, blank=True, null=True) + survex_file = models.CharField(max_length=100, blank=True, null=True) + description_file = models.CharField(max_length=200, blank=True, null=True) + url = models.CharField(max_length=200, blank=True, null=True) + filename = models.CharField(max_length=200) + + class Meta: + managed = False + db_table = 'core_cave' + + +class CoreCaveArea(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + cave = models.ForeignKey(CoreCave, models.DO_NOTHING) + area = models.ForeignKey(CoreArea, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_cave_area' + unique_together = (('cave', 'area'),) + + +class CoreCaveandentrance(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + entrance_letter = models.CharField(max_length=20, blank=True, null=True) + cave = models.ForeignKey(CoreCave, models.DO_NOTHING) + entrance = models.ForeignKey('CoreEntrance', models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_caveandentrance' + + +class CoreCavedescription(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + short_name = models.CharField(unique=True, max_length=50) + long_name = models.CharField(max_length=200, blank=True, null=True) + description = models.TextField(blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_cavedescription' + + +class CoreCavedescriptionLinkedEntrances(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + cavedescription = models.ForeignKey(CoreCavedescription, models.DO_NOTHING) + entrance = models.ForeignKey('CoreEntrance', models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_cavedescription_linked_entrances' + unique_together = (('cavedescription', 'entrance'),) + + +class CoreCavedescriptionLinkedQms(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + cavedescription = models.ForeignKey(CoreCavedescription, models.DO_NOTHING) + qm = models.ForeignKey('CoreQm', models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_cavedescription_linked_qms' + unique_together = (('cavedescription', 'qm'),) + + +class CoreCavedescriptionLinkedSubcaves(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + cavedescription = models.ForeignKey(CoreCavedescription, models.DO_NOTHING) + newsubcave = models.ForeignKey('CoreNewsubcave', models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_cavedescription_linked_subcaves' + unique_together = (('cavedescription', 'newsubcave'),) + + +class CoreCaveslug(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + slug = models.CharField(unique=True, max_length=50) + primary = models.BooleanField() + cave = models.ForeignKey(CoreCave, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_caveslug' + + +class CoreDataissue(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + date = models.DateTimeField() + parser = models.CharField(max_length=50, blank=True, null=True) + message = models.CharField(max_length=400, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_dataissue' + + +class CoreEntrance(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + name = models.CharField(max_length=100, blank=True, null=True) + entrance_description = models.TextField(blank=True, null=True) + explorers = models.TextField(blank=True, null=True) + map_description = models.TextField(blank=True, null=True) + location_description = models.TextField(blank=True, null=True) + approach = models.TextField(blank=True, null=True) + underground_description = models.TextField(blank=True, null=True) + photo = models.TextField(blank=True, null=True) + marking = models.CharField(max_length=2) + marking_comment = models.TextField(blank=True, null=True) + findability = models.CharField(max_length=1, blank=True, null=True) + findability_description = models.TextField(blank=True, null=True) + alt = models.TextField(blank=True, null=True) + northing = models.TextField(blank=True, null=True) + easting = models.TextField(blank=True, null=True) + tag_station = models.TextField(blank=True, null=True) + exact_station = models.TextField(blank=True, null=True) + other_station = models.TextField(blank=True, null=True) + other_description = models.TextField(blank=True, null=True) + bearings = models.TextField(blank=True, null=True) + url = models.CharField(max_length=200, blank=True, null=True) + filename = models.CharField(max_length=200) + cached_primary_slug = models.CharField(max_length=200, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_entrance' + + +class CoreEntranceslug(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + slug = models.CharField(unique=True, max_length=50) + primary = models.BooleanField() + entrance = models.ForeignKey(CoreEntrance, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_entranceslug' + + +class CoreExpedition(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + year = models.CharField(unique=True, max_length=20) + name = models.CharField(max_length=100) + + class Meta: + managed = False + db_table = 'core_expedition' + + +class CoreExpeditionday(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + date = models.DateField() + expedition = models.ForeignKey(CoreExpedition, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_expeditionday' + + +class CoreLogbookentry(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + date = models.DateField() + title = models.CharField(max_length=200) + cave_slug = models.CharField(max_length=50, blank=True, null=True) + place = models.CharField(max_length=100, blank=True, null=True) + text = models.TextField() + slug = models.CharField(max_length=50) + filename = models.CharField(max_length=200, blank=True, null=True) + entry_type = models.CharField(max_length=50, blank=True, null=True) + expedition = models.ForeignKey(CoreExpedition, models.DO_NOTHING, blank=True, null=True) + expeditionday = models.ForeignKey(CoreExpeditionday, models.DO_NOTHING, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_logbookentry' + + +class CoreNewsubcave(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + name = models.CharField(unique=True, max_length=200) + + class Meta: + managed = False + db_table = 'core_newsubcave' + + +class CoreOthercavename(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + name = models.CharField(max_length=160) + cave = models.ForeignKey(CoreCave, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_othercavename' + + +class CorePerson(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + first_name = models.CharField(max_length=100) + last_name = models.CharField(max_length=100) + fullname = models.CharField(max_length=200) + is_vfho = models.BooleanField() + mug_shot = models.CharField(max_length=100, blank=True, null=True) + blurb = models.TextField(blank=True, null=True) + orderref = models.CharField(max_length=200) + user = models.ForeignKey(AuthUser, models.DO_NOTHING, unique=True, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_person' + + +class CorePersonexpedition(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + slugfield = models.CharField(max_length=50, blank=True, null=True) + is_guest = models.BooleanField() + expo_committee_position = models.CharField(max_length=200, blank=True, null=True) + nickname = models.CharField(max_length=100, blank=True, null=True) + expedition = models.ForeignKey(CoreExpedition, models.DO_NOTHING) + person = models.ForeignKey(CorePerson, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_personexpedition' + + +class CorePersontrip(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + time_underground = models.FloatField() + is_logbook_entry_author = models.BooleanField() + logbook_entry = models.ForeignKey(CoreLogbookentry, models.DO_NOTHING) + personexpedition = models.ForeignKey(CorePersonexpedition, models.DO_NOTHING, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_persontrip' + + +class CoreQm(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + new_since_parsing = models.BooleanField() + non_public = models.BooleanField() + number = models.IntegerField() + grade = models.CharField(max_length=1) + location_description = models.TextField() + nearest_station_description = models.CharField(max_length=400, blank=True, null=True) + nearest_station_name = models.CharField(max_length=200, blank=True, null=True) + area = models.CharField(max_length=100, blank=True, null=True) + completion_description = models.TextField(blank=True, null=True) + comment = models.TextField(blank=True, null=True) + found_by = models.ForeignKey(CoreLogbookentry, models.DO_NOTHING, blank=True, null=True) + nearest_station = models.ForeignKey('CoreSurvexstation', models.DO_NOTHING, blank=True, null=True) + ticked_off_by = models.ForeignKey(CoreLogbookentry, models.DO_NOTHING, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_qm' + + +class CoreScansfolder(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + fpath = models.CharField(max_length=200) + walletname = models.CharField(max_length=200) + + class Meta: + managed = False + db_table = 'core_scansfolder' + + +class CoreSinglescan(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + ffile = models.CharField(max_length=200) + name = models.CharField(max_length=200) + scansfolder = models.ForeignKey(CoreScansfolder, models.DO_NOTHING, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_singlescan' + + +class CoreSurvexblock(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + name = models.CharField(max_length=100) + title = models.CharField(max_length=100) + date = models.DateField(blank=True, null=True) + survexpath = models.CharField(max_length=200) + legsall = models.IntegerField(blank=True, null=True) + legslength = models.FloatField(blank=True, null=True) + cave = models.ForeignKey(CoreCave, models.DO_NOTHING, blank=True, null=True) + expedition = models.ForeignKey(CoreExpedition, models.DO_NOTHING, blank=True, null=True) + expeditionday = models.ForeignKey(CoreExpeditionday, models.DO_NOTHING, blank=True, null=True) + scansfolder = models.ForeignKey(CoreScansfolder, models.DO_NOTHING, blank=True, null=True) + survexfile = models.ForeignKey('CoreSurvexfile', models.DO_NOTHING, blank=True, null=True) + parent = models.ForeignKey('self', models.DO_NOTHING, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_survexblock' + + +class CoreSurvexdirectory(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + path = models.CharField(max_length=200) + cave = models.ForeignKey(CoreCave, models.DO_NOTHING, blank=True, null=True) + primarysurvexfile = models.ForeignKey('CoreSurvexfile', models.DO_NOTHING, blank=True, null=True) + + class Meta: + managed = False + db_table = 'core_survexdirectory' +# Unable to inspect table 'core_survexfile' +# The error was: list index out of range +# Unable to inspect table 'core_survexpersonrole' +# The error was: list index out of range +# Unable to inspect table 'core_survexstation' +# The error was: list index out of range +# Unable to inspect table 'core_survextitle' +# The error was: list index out of range + + +class CoreTunnelfile(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + tunnelpath = models.CharField(max_length=200) + tunnelname = models.CharField(max_length=200) + bfontcolours = models.BooleanField() + filesize = models.IntegerField() + npaths = models.IntegerField() + + class Meta: + managed = False + db_table = 'core_tunnelfile' + + +class CoreTunnelfileManyscansfolders(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + tunnelfile = models.ForeignKey(CoreTunnelfile, models.DO_NOTHING) + scansfolder = models.ForeignKey(CoreScansfolder, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_tunnelfile_manyscansfolders' + unique_together = (('tunnelfile', 'scansfolder'),) + + +class CoreTunnelfileScans(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + tunnelfile = models.ForeignKey(CoreTunnelfile, models.DO_NOTHING) + singlescan = models.ForeignKey(CoreSinglescan, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_tunnelfile_scans' + unique_together = (('tunnelfile', 'singlescan'),) + + +class CoreTunnelfileSurvexfiles(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + tunnelfile = models.ForeignKey(CoreTunnelfile, models.DO_NOTHING) + survexfile = models.ForeignKey('CoreSurvexfile', models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_tunnelfile_survexfiles' + unique_together = (('tunnelfile', 'survexfile'),) + + +class CoreTunnelfileTunnelcontains(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + from_tunnelfile = models.ForeignKey(CoreTunnelfile, models.DO_NOTHING) + to_tunnelfile = models.ForeignKey(CoreTunnelfile, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'core_tunnelfile_tunnelcontains' + unique_together = (('from_tunnelfile', 'to_tunnelfile'),) +# Unable to inspect table 'django_admin_log' +# The error was: list index out of range + + +class DjangoContentType(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + app_label = models.CharField(max_length=100) + model = models.CharField(max_length=100) + + class Meta: + managed = False + db_table = 'django_content_type' + unique_together = (('app_label', 'model'),) + + +class DjangoMigrations(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + app = models.CharField(max_length=255) + name = models.CharField(max_length=255) + applied = models.DateTimeField() + + class Meta: + managed = False + db_table = 'django_migrations' + + +class DjangoSession(models.Model): + session_key = models.CharField(primary_key=True, max_length=40) + session_data = models.TextField() + expire_date = models.DateTimeField() + + class Meta: + managed = False + db_table = 'django_session' + + +class FlatpagesEntranceredirect(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + originalurl = models.CharField(db_column='originalURL', max_length=200) # Field name made lowercase. + entrance = models.ForeignKey(CoreEntrance, models.DO_NOTHING) + + class Meta: + managed = False + db_table = 'flatpages_entranceredirect' + + +class FlatpagesRedirect(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + originalurl = models.CharField(db_column='originalURL', unique=True, max_length=200) # Field name made lowercase. + newurl = models.CharField(db_column='newURL', max_length=200) # Field name made lowercase. + + class Meta: + managed = False + db_table = 'flatpages_redirect' + + +class RegistrationRegistrationprofile(models.Model): + id = models.IntegerField(primary_key=True) # AutoField? + activation_key = models.CharField(max_length=40) + user = models.ForeignKey(AuthUser, models.DO_NOTHING, unique=True) + + class Meta: + managed = False + db_table = 'registration_registrationprofile' diff --git a/wsgi.py b/wsgi.py index 056838b..86da323 100644 --- a/wsgi.py +++ b/wsgi.py @@ -4,7 +4,7 @@ WSGI config for mysite project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os