diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-04-13 00:43:57 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-04-13 00:43:57 +0100 |
commit | 5b3b0e67e9744671fadeca78e5565d3dbd1f81c1 (patch) | |
tree | 0b6b9e52d023567bc1e92878ce43a0b7b2fada26 /core/utils.py | |
parent | 304bbd230a1b801069cfce259c6ad0f25d48116c (diff) | |
download | troggle-5b3b0e67e9744671fadeca78e5565d3dbd1f81c1.tar.gz troggle-5b3b0e67e9744671fadeca78e5565d3dbd1f81c1.tar.bz2 troggle-5b3b0e67e9744671fadeca78e5565d3dbd1f81c1.zip |
create core/models/ directroy
Diffstat (limited to 'core/utils.py')
-rw-r--r-- | core/utils.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/core/utils.py b/core/utils.py index 84a8191..b2a9249 100644 --- a/core/utils.py +++ b/core/utils.py @@ -21,13 +21,11 @@ from django.conf import settings from django.urls import reverse from django.template import Context, loader -#import troggle.core.models_survex - '''This file declares TROG a globally visible object for caches. TROG is a dictionary holding gloablly visible indexes and cache functions. It is a Global Object, see https://python-patterns.guide/python/module-globals/ -troggle.models.TROG +troggle.utils.TROG chaosmonkey(n) - used by survex import to regenerate some .3d files save_carefully() - core function that saves troggle objects in the database @@ -102,22 +100,6 @@ def save_carefully(objectType, lookupAttribs={}, nonLookupAttribs={}): logging.info(str(instance) + " existed in the database unchanged since last parse. It was overwritten by the current script. \n") return (instance, created) -# def get_related_by_wikilinks(wiki_text): - # found=re.findall(settings.QM_PATTERN,wiki_text) - # res=[] - # for wikilink in found: - # qmdict={'urlroot':settings.URL_ROOT,'cave':wikilink[2],'year':wikilink[1],'number':wikilink[3]} - # try: - # cave_slugs = models_caves.CaveSlug.objects.filter(cave__kataster_number = qmdict['cave']) - # qm=QM.objects.get(found_by__cave_slug__in = cave_slugs, - # found_by__date__year = qmdict['year'], - # number = qmdict['number']) - # res.append(qm) - # except QM.DoesNotExist: - # print(('fail on '+str(wikilink))) - - # return res - |