forked from expo/troggle
Docstrings for all modules
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
from django.conf import settings
|
||||
from troggle.core.models.troggle import Expedition
|
||||
|
||||
'''This is the only troglle-specific 'context processor' that troggle uses
|
||||
in the processing of Django templates
|
||||
|
||||
This seems to mean that every page produced has bundled in its context the complete 'settings' and
|
||||
the expedition class object, so all templates can doe queries on Expedition.
|
||||
https://betterprogramming.pub/django-quick-tips-context-processors-da74f887f1fc
|
||||
'''
|
||||
|
||||
def troggle_context(request):
|
||||
return { 'settings':settings, 'Expedition':Expedition }
|
||||
@@ -11,6 +11,10 @@ from django.contrib.admin.widgets import AdminDateWidget
|
||||
from troggle.core.models.troggle import Person, PersonExpedition, Expedition
|
||||
from troggle.core.models.caves import Cave, LogbookEntry, QM, Entrance, CaveAndEntrance
|
||||
|
||||
'''These are all the Forms used by troggle
|
||||
Some are not used and need renovating or destroying.
|
||||
'''
|
||||
|
||||
class CaveForm(ModelForm):
|
||||
underground_description = forms.CharField(required = False, widget=forms.Textarea())
|
||||
explorers = forms.CharField(required = False, widget=forms.Textarea())
|
||||
|
||||
@@ -2,6 +2,7 @@ from django.conf import settings
|
||||
from django import http
|
||||
from django.urls import reverse, resolve,Resolver404
|
||||
"""Non-standard django middleware is loaded from this file.
|
||||
It needs re-writing to be compatible with Django v2.0+
|
||||
"""
|
||||
|
||||
class SmartAppendSlashMiddleware(object):
|
||||
|
||||
@@ -5,8 +5,8 @@ import logging
|
||||
from django.conf import settings
|
||||
from django.shortcuts import render
|
||||
|
||||
"""Oddball mixture of critical, superfluous and useful functions which should
|
||||
be re-located more sensibly to other modules:
|
||||
"""Oddball mixture of apparently now superfluous functions which should
|
||||
be deleted
|
||||
|
||||
|
||||
various HTML/wiki functions presumably for logbooks?
|
||||
|
||||
@@ -15,13 +15,18 @@ from django.shortcuts import get_object_or_404, render
|
||||
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
|
||||
|
||||
import troggle.settings as settings
|
||||
#import troggle.core.models as models
|
||||
from troggle.core.views import expo
|
||||
from troggle.core.models.troggle import Expedition, DataIssue
|
||||
from troggle.core.models.caves import CaveSlug, Cave, CaveAndEntrance, QM, EntranceSlug, Entrance, Area, SurvexStation, GetCaveLookup
|
||||
from troggle.core.forms import CaveForm, CaveAndEntranceFormSet, VersionControlCommentForm, EntranceForm, EntranceLetterForm
|
||||
from .login import login_required_if_public
|
||||
|
||||
'''Manages the complex procedures to assemble a cave description out of the compnoents
|
||||
Manages the use of cavern to parse survex files to produce 3d and pos files
|
||||
|
||||
Also generates the prospecting guide document.
|
||||
'''
|
||||
|
||||
class MapLocations(object):
|
||||
p = [
|
||||
("laser.0_7", "BNase", "Reference", "Bräuning Nase laser point"),
|
||||
|
||||
@@ -17,6 +17,9 @@ from troggle.core.models.survex import SurvexBlock
|
||||
|
||||
import troggle.settings as settings
|
||||
|
||||
'''Very simple report pages summarizing data about the whole set of expeditions and of
|
||||
the status of data inconsistencies
|
||||
'''
|
||||
|
||||
def pathsreport(request):
|
||||
pathsdict = OrderedDict()
|
||||
|
||||
@@ -19,6 +19,10 @@ from troggle.core.models.survex import SurvexBlock, SurvexPersonRole, SurvexFile
|
||||
from troggle.core.models.caves import Cave, PersonTrip, LogbookEntry
|
||||
from troggle.parsers.people import GetPersonExpeditionNameLookup
|
||||
|
||||
'''Everything that views survexfiles
|
||||
but also displays data on a cave or caves when there is ambiguity
|
||||
'''
|
||||
|
||||
survexdatasetpath = Path(settings.SURVEX_DATA)
|
||||
|
||||
survextemplatefile = """; *** THIS IS A TEMPLATE FILE NOT WHAT YOU MIGHT BE EXPECTING ***
|
||||
|
||||
Reference in New Issue
Block a user