mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 21:57:08 +00:00
Update URLs to django documn version
This commit is contained in:
@@ -16,7 +16,7 @@ But paths like this:
|
||||
which rely on database resolution will fail unless a fixture has been set up for
|
||||
them.
|
||||
|
||||
https://docs.djangoproject.com/en/3.2/topics/testing/tools/
|
||||
https://docs.djangoproject.com/en/dev/topics/testing/tools/
|
||||
"""
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
@@ -16,7 +16,7 @@ But paths like this:
|
||||
which rely on database resolution will fail unless a fixture has been set up for
|
||||
them.
|
||||
|
||||
https://docs.djangoproject.com/en/3.0/topics/testing/tools/
|
||||
https://docs.djangoproject.com/en/dev/topics/testing/tools/
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ class EntranceForm(ModelForm):
|
||||
# This next line is called from the templates/edit_cave2.html template.
|
||||
# This is sufficient to create an entire entry for for the cave fields automatically
|
||||
# http://localhost:8000/cave/new/
|
||||
# using django built-in Deep Magic. https://docs.djangoproject.com/en/3.2/topics/forms/modelforms/
|
||||
# using django built-in Deep Magic. https://docs.djangoproject.com/en/dev/topics/forms/modelforms/
|
||||
# for forms which map directly onto a Django Model
|
||||
CaveAndEntranceFormSet = modelformset_factory(CaveAndEntrance, exclude=("cave",))
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ https://www.mattlayman.com/understand-django/command-apps/
|
||||
https://www.geeksforgeeks.org/custom-django-management-commands/
|
||||
|
||||
Django docs:
|
||||
https://docs.djangoproject.com/en/3.2/howto/custom-management-commands/
|
||||
https://docs.djangoproject.com/en/dev/howto/custom-management-commands/
|
||||
|
||||
We might use this mechanism to replace/enhance the
|
||||
folk, wallets and any cron jobs or other standalone scripts.
|
||||
|
||||
@@ -161,7 +161,7 @@ class Cave(TroggleModel):
|
||||
# qms = self.qm_set.all().order_by('expoyear', 'block__date')
|
||||
qms = QM.objects.filter(cave=self).order_by(
|
||||
"expoyear", "block__date"
|
||||
) # a QuerySet, see https://docs.djangoproject.com/en/4.0/ref/models/querysets/#order-by
|
||||
) # a QuerySet, see https://docs.djangoproject.com/en/dev/ref/models/querysets/#order-by
|
||||
return qms # a QuerySet
|
||||
|
||||
def kat_area(self):
|
||||
|
||||
@@ -288,7 +288,7 @@ def scansingle(request, path, file):
|
||||
|
||||
def allscans(request):
|
||||
"""Returns all the wallets in the system, we would like to use
|
||||
the Django queryset SQL optimisation https://docs.djangoproject.com/en/3.2/ref/models/querysets/#prefetch-related
|
||||
the Django queryset SQL optimisation https://docs.djangoproject.com/en/dev/ref/models/querysets/#prefetch-related
|
||||
to get the related singlescan and survexblock objects but that requires rewriting this to do the query on those, not on
|
||||
the wallets
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user