forked from expo/troggle
create core/models/ directroy
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user