mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-05-15 16:56:33 +01:00
better "to do" list in function
This commit is contained in:
+16
-10
@@ -84,7 +84,9 @@ class NewHoleForm(forms.Form):
|
||||
photo_ent_no = forms.BooleanField(label="Entrance photos ?", required=False)
|
||||
photo_ent_who = forms.CharField(label="Who has photos of entrance, tag and GPS?", required=False)
|
||||
|
||||
who_are_you = forms.CharField(strip=True, label="Who are you ? (You do not need to have been on this trip)",
|
||||
who_are_you = forms.CharField(strip=True,
|
||||
label="Who are you ? (You do not need to have been on this trip)",
|
||||
required=True,
|
||||
widget=forms.TextInput(
|
||||
attrs={"size": 100, "placeholder": "You are entering data, who are you ? e.g. 'Becka' or 'Animal <mta@gasthof.expo>'",
|
||||
"style": "vertical-align: text-top;"}
|
||||
@@ -311,7 +313,9 @@ from django.shortcuts import render, redirect
|
||||
from django.contrib import messages
|
||||
|
||||
def new_hole(request):
|
||||
identified_login = is_identified_user(request.user)
|
||||
|
||||
editor_id = get_editor(request)
|
||||
|
||||
areatext = None
|
||||
if request.method == 'POST':
|
||||
form = NewHoleForm(request.POST, request.FILES)
|
||||
@@ -359,20 +363,22 @@ def get_auto_file():
|
||||
|
||||
def process_new_hole(form, area):
|
||||
"""
|
||||
➜Detect if logged-in & set editor using the cookie system
|
||||
⚡Detect if logged-in & set who_am_i using the cookie system, make read-only if logged in
|
||||
|
||||
✅ Create a fixed point record by inserting into :loser:/fixedpts/gps/auto.svx
|
||||
✅ Create a fixed point *fix record by inserting into :loser:/fixedpts/gps/auto.svx
|
||||
✅ Do a git commit (loser) of the new GPS position
|
||||
➜Create a new Cave description file
|
||||
➜Create an associated new Entrance description file
|
||||
➜Do a git commit (expoweb) of the new Cave and Entrance description files
|
||||
➜Update the database with this new Cave
|
||||
➜Update the database with this new Entrance
|
||||
⚡Create a new Cave description file
|
||||
⚡Create an associated new Entrance description file with GPS location using *fix
|
||||
⚡Update the database with this new Cave
|
||||
⚡Update the database with this new Entrance
|
||||
⚡Do a git commit (expoweb) of the new Cave and Entrance description files
|
||||
|
||||
⚡Update the database "locations" with the new *fix (is this even possible without reset?)
|
||||
|
||||
writes:
|
||||
*fix 1623.g2025-bz-06 47.6964481 13.816103 0
|
||||
we do not put "reference" in the *fix because we know it is used in the Entrance we are creating
|
||||
❌BUT we do put reference in now because we haven't written the Entrance bit of the code yet!
|
||||
❌BUT we DO put reference in now because we haven't written the Entrance bit of the code yet!
|
||||
"""
|
||||
auto_gps_file, content = get_auto_file()
|
||||
fix_id = f"{area}.g{form.cleaned_data.get("cave_id").lower()}"
|
||||
|
||||
Reference in New Issue
Block a user