mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 04:27:45 +00:00
New year, new expo: bugs for auto-creating new expo
This commit is contained in:
@@ -350,8 +350,8 @@ class NewProspectForm(forms.Form):
|
||||
max_length=20,
|
||||
widget=forms.TextInput(attrs={
|
||||
"placeholder": "2025-AB-01",
|
||||
"size": 10,
|
||||
"style": "width: 10ch; min-width: 0;"
|
||||
"size": 11,
|
||||
"style": "width: 11ch; min-width: 0;"
|
||||
})
|
||||
)
|
||||
discovery_name = forms.CharField(
|
||||
@@ -394,6 +394,26 @@ class NewProspectForm(forms.Form):
|
||||
"style": "width: 20ch; min-width: 0;"
|
||||
})
|
||||
)
|
||||
entrance_description = forms.CharField(
|
||||
label="Entrance description",
|
||||
max_length=100,
|
||||
required=True,
|
||||
widget=forms.TextInput(attrs={
|
||||
"placeholder": "horizontal slot at foot level in 3m high NE-facing cliff",
|
||||
"size": 100,
|
||||
"style": "width: 100ch; min-width: 0;"
|
||||
})
|
||||
)
|
||||
approach = forms.CharField(
|
||||
label="Approach",
|
||||
max_length=100,
|
||||
required=True,
|
||||
widget=forms.TextInput(attrs={
|
||||
"placeholder": "from top camp, go NE round the side of Augst Eck, in some trees",
|
||||
"size": 100,
|
||||
"style": "width: 100ch; min-width: 0;"
|
||||
})
|
||||
)
|
||||
who_are_you = forms.CharField(
|
||||
label="Who are you",
|
||||
max_length=100,
|
||||
|
||||
@@ -140,6 +140,7 @@ def read_signups():
|
||||
|
||||
signupsfile = signups_dir / SIGNUPS_FILE
|
||||
if not signupsfile.is_file():
|
||||
print(f" ! Nobody has signed up for expedition {current_expo()} yet.")
|
||||
return { "SIGNEDUP": {} } # dict where e.g. {"philip-sargent": encrypted_form_data, more users etc.}
|
||||
|
||||
with open(signupsfile, 'r', encoding='utf-8') as json_f:
|
||||
|
||||
@@ -828,11 +828,13 @@ def _collect_logbook_entries_for_expos(expos, nologbook, ENTRIES, BLOG_PARSER_SE
|
||||
|
||||
for ex in loglist:
|
||||
logentries = parse_logbook_for_expedition(ex)
|
||||
if logentries:
|
||||
allentries += logentries
|
||||
|
||||
for b in bloglist:
|
||||
print(f" - BLOG: {b}")
|
||||
logentries = parse_logbook_for_expedition(b, blog=True)
|
||||
if logentries:
|
||||
allentries += logentries
|
||||
|
||||
return allentries
|
||||
|
||||
@@ -241,13 +241,17 @@ def load_people_expos():
|
||||
|
||||
def check_new_signups(expedition):
|
||||
signups_clear = read_signups()
|
||||
# print(signups_clear)
|
||||
print(signups_clear)
|
||||
if 'SIGNEDUP' in signups_clear:
|
||||
return
|
||||
for slug in signups_clear:
|
||||
print(f" - Checking signups {slug}")
|
||||
try:
|
||||
p = Person.objects.get(slug=slug)
|
||||
pe = PersonExpedition.objects.update_or_create(person=p, expedition=expedition)
|
||||
# print("ADDING ",pe, expedition)
|
||||
|
||||
except Exception as e:
|
||||
print("EXCEPTION ADDING ",slug , expedition)
|
||||
|
||||
def ensure_users_are_persons():
|
||||
# Just ensure this is up to date.
|
||||
|
||||
@@ -25,7 +25,6 @@ New Cave and Entrance
|
||||
}
|
||||
.prospect-form label {
|
||||
display: inline-block;
|
||||
width: 320px;
|
||||
text-align: right;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
{% endif %}
|
||||
<a href="/logbookedit/">Logbook Entry</a> |
|
||||
<a id="cavesLink" href="/caves_recent">Caves</a> |
|
||||
<a id="prospectLink" href="/newprospect">New Prospect</a> |
|
||||
<a id="qmsLink" href="{% url "caveQMs" "1623-290" %}">QMs</a> |
|
||||
<a href="{% url "survexcaveslist" %}">Survex files</a> |
|
||||
<a href="{% url "survexcaveslist" %}">Survex</a> |
|
||||
<a href="{% url "allscans" %}">Scans</a> |
|
||||
<a href="{% url "walletedit" %}">Upload Scans</a> |
|
||||
<a href="{% url "dwgallfiles" %}">Drawings</a> |
|
||||
|
||||
Reference in New Issue
Block a user