From 2cb665e141e617abe96dec5d038e6a355fbe01a9 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Mon, 15 Jul 2024 12:41:58 +0200 Subject: [PATCH] to-do comments updated --- core/models/caves.py | 9 --------- core/models/logbooks.py | 4 ---- core/views/uploads.py | 3 --- 3 files changed, 16 deletions(-) diff --git a/core/models/caves.py b/core/models/caves.py index c03b169..0d16082 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -25,16 +25,7 @@ Gcave_count = None """ todo = """ -- Find out why we have separate objects CaveSlug and why - these are not just a single field on the Model. This was Martin's idea, - but we are using text aliases now so we only need one slug in the data model - -- Can we rewrite things to eliminate the CaveSlug and objects? Surely - foreign keys work fine ?! - - Why do we have CaveAndEntrance objects ? These do not need to be explcit for a many:many relationship these days - -- move the aliases list from the code and put into an editable file - Restore constraint: unique_together = (("area", "kataster_number"), ("area", "unofficial_number")) or replace by a unique 'slug' field, better. diff --git a/core/models/logbooks.py b/core/models/logbooks.py index d8b4d93..37d6cb1 100644 --- a/core/models/logbooks.py +++ b/core/models/logbooks.py @@ -15,10 +15,6 @@ from troggle.core.models.troggle import Expedition, TroggleModel """ todo = """ - - Foreign keys do not allow for there being multiple ways to refer to a cave, eg 1623-1999-03 aka 1623-204 - Having slugs allows for much more loose coupling to caves, which removes alot of the need to reset the database, which interupts work flow. - It also means we do not have to be creating temporary cave objects in the database, where we do not have the underlying file in cave_data. """ diff --git a/core/views/uploads.py b/core/views/uploads.py index 23f89fb..8b9656e 100644 --- a/core/views/uploads.py +++ b/core/views/uploads.py @@ -29,9 +29,6 @@ todo = """ Validate image files using a magic recogniser in walletedit() https://pypi.org/project/reportlab/ or https://stackoverflow.com/questions/889333/how-to-check-if-a-file-is-a-valid-image-file - -- Write equivalent GPX upload form system, similar to walletedit() but in expofiles/gpslogs/ - Need to validate it as being a valid GPX file using an XML parser, not a dubious script or hack - Validate Tunnel & Therion files using an XML parser in dwgupload(). Though Julian says tunnel is only mostly correct XML, and it does fail at least one XML parser.