summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/utils.py9
-rw-r--r--core/views/signup.py46
-rw-r--r--templates/signup.html44
3 files changed, 59 insertions, 40 deletions
diff --git a/core/utils.py b/core/utils.py
index 3dbbd9f..69425ca 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -122,12 +122,15 @@ def make_new_expo(year):
u.save()
def make_new_expo_dir(year):
- t = "<a href='index.html'>index</a><br><a href='mission.html'>mission</a><br><a href='logbook.html'>logbook</a><br>"
+ pages = ["index", "logbook", "mission", "travel"]
+ t = "<hr />"
+ for ff in pages:
+ t += f"<a href='{ff}.html'>{ff}</a><br>\n"
year_dir = Path(settings.EXPOWEB, 'years', year)
if not year_dir.is_dir():
year_dir.mkdir(parents=True, exist_ok=True)
- for ff in ["index","logbook", "mission"]:
- content = f"<html><head><title>{ff}</title></head><body><h1>{ff}</h1>{t}</body></html>"
+ for ff in pages:
+ content = f"<html><head><title>{year} {ff}</title></head><body><h1>{ff}</h1>Add content here.{t}</body></html>"
p = Path(year_dir, ff+".html")
if not p.is_file():
write_and_commit( [(p, content, "utf8")], f"Auto new year {ff} file creation", "Auto New Year <make_new_expo_dir@troggle.expo>")
diff --git a/core/views/signup.py b/core/views/signup.py
index d36b095..f390002 100644
--- a/core/views/signup.py
+++ b/core/views/signup.py
@@ -30,9 +30,9 @@ def signup(request):
pageform = ExpoSignupForm(request.POST) # A form bound to the POST data
if pageform.is_valid():
print(f"form OK")
- who = pageform.cleaned_data["name"]
- who = git_string(editor)
- print(f"{who=}")
+ who = pageform.cleaned_data["name"]
+ who = git_string(name)
+ print(f"{who=}")
return render(
request,
"signup.html",
@@ -42,7 +42,12 @@ def signup(request):
}
)
else:
- pageform = ExpoSignupForm(initial={"allergies":"None", "medication":"None", "medic_info":"None", })
+ pageform = ExpoSignupForm(initial={"allergies":"None",
+ "medication":"None",
+ "medic_info":"None",
+ "veggie": "mostly",
+ "student": "no",
+ })
return render(
request,
"signup.html",
@@ -58,40 +63,43 @@ class ExpoSignupForm(forms.Form):
email = forms.EmailField(widget=forms.TextInput(attrs={'tabindex': 4, 'placeholder': 'a.device@potatohut.expo'}))
kinname = forms.CharField(label='Next of Kin name', max_length=100, widget=forms.TextInput(attrs={'tabindex': 5, 'placeholder': 'Newton Pulsifer'}))
- kinaddress = forms.CharField(widget=forms.Textarea(attrs={'rows': 7, 'cols': 20, 'tabindex': 6}))
- kinphone = forms.CharField(max_length=15, widget=forms.TextInput(attrs={'tabindex': 7}))
- kinemail = forms.EmailField(widget=forms.TextInput(attrs={'tabindex': 8}))
+ kinaddress = forms.CharField(widget=forms.Textarea(attrs={'rows': 7, 'cols': 20, 'tabindex': 6, 'placeholder': 'c/o The Old Ship Inn,\nLower Tadfield'}))
+ kinphone = forms.CharField(max_length=15, widget=forms.TextInput(attrs={'tabindex': 7, 'placeholder': '+44.0987654321'}))
+ kinemail = forms.EmailField(widget=forms.TextInput(attrs={'tabindex': 8, 'placeholder': 'n.pulsifer@basecamp.expo'}))
relation = forms.CharField(label='Relation to you', max_length=100, widget=forms.TextInput(attrs={'tabindex': 9, 'placeholder': 'Beau'}))
VEGGIE_CHOICES = [
- ('yes', 'Yes'),
- ('mostly', 'Mostly'),
+ ('vegan', 'Vegan'),
+ ('yes', 'Vegetarian'),
+ ('mostly', 'Mostly Vegetarian'),
('no', 'No'),
]
STUDENT_CHOICES = [
- ('yes', 'Yes'),
- ('no', 'No'),
+ ('yes', 'Yes, I am an impecunious starvelling'),
+ ('no', 'No, I have pots of dosh'),
]
veggie = forms.ChoiceField(choices=VEGGIE_CHOICES, widget=forms.RadioSelect(attrs={'tabindex': 10}))
student = forms.ChoiceField(choices=STUDENT_CHOICES, widget=forms.RadioSelect(attrs={'tabindex': 11}))
- transport_ok = forms.ChoiceField(choices=[('yes', 'Yes'), ('no', 'No')],
- widget=forms.RadioSelect(attrs={'tabindex': 12}), initial='yes')
- transport_info = forms.CharField(widget=forms.Textarea(attrs={'rows': 6, 'cols': 80, 'tabindex': 13}),
+ transport_ok = forms.ChoiceField(choices=[('yes', 'Yes, I have arranged transport'), ('no', 'No, I need transport')],
+ widget=forms.RadioSelect(attrs={'tabindex': 12}), initial='no')
+ transport_info = forms.CharField(widget=forms.Textarea(attrs={'rows': 6, 'cols': 80, 'tabindex': 13, "placeholder":"I am a numpty and have no clue how I will get there (or back)."}),
required=False)
- bivvy = forms.BooleanField(required=False, widget=forms.CheckboxInput(attrs={'tabindex': 14}))
+ bivvy = forms.BooleanField(required=False, widget=forms.CheckboxInput(attrs={'tabindex': 14, }))
tent = forms.BooleanField(required=False, widget=forms.CheckboxInput(attrs={'tabindex': 15}))
- top_tent_cap = forms.IntegerField(required=False, widget=forms.NumberInput(attrs={'tabindex': 16}))
+ top_tent_cap = forms.IntegerField(required=False, widget=forms.TextInput(attrs={'size': 1, 'tabindex': 16, "placeholder":2}))
btent = forms.BooleanField(required=False, widget=forms.CheckboxInput(attrs={'tabindex': 17}))
- base_tent_cap = forms.IntegerField(required=False, widget=forms.NumberInput(attrs={'tabindex': 18}))
+ base_tent_cap = forms.IntegerField(required=False, widget=forms.TextInput(attrs={'size': 1, 'tabindex': 18, "size":1, "placeholder":3}))
allergies = forms.CharField(widget=forms.Textarea(attrs={'rows': 2, 'cols': 80, 'tabindex': 19}), required=False)
medication = forms.CharField(widget=forms.Textarea(attrs={'rows': 2, 'cols': 80, 'tabindex': 20}), required=False)
medic_info = forms.CharField(widget=forms.Textarea(attrs={'rows': 5, 'cols': 80, 'tabindex': 21}), required=False)
- extra_info = forms.CharField(widget=forms.Textarea(attrs={'rows': 15, 'cols': 80, 'tabindex': 22}), required=False)
+ extra_info = forms.CharField(widget=forms.Textarea(attrs={'rows': 5, 'cols': 80, 'tabindex': 22,
+ 'placeholder': 'Estuary english (fluent),\nCan use the potato hut bread machine (level 3 certificate)'}), required=False)
- aims = forms.CharField(widget=forms.Textarea(attrs={'rows': 15, 'cols': 80, 'tabindex': 23}), required=False)
+ aims = forms.CharField(widget=forms.Textarea(attrs={'rows': 5, 'cols': 80, 'tabindex': 23, 'placeholder': 'Strolling over the plateau, sunning myself and taking in the views.'}), required=False)
+
diff --git a/templates/signup.html b/templates/signup.html
index e667a4e..138d95c 100644
--- a/templates/signup.html
+++ b/templates/signup.html
@@ -17,10 +17,11 @@ Loser Expo 2025 SIGN-UP Form
{% load static %}
<style type="text/css">
- body { font-family: sans-serif; margin-left: 8%; margin-right: 8%; margin-top: 4%; margin-bottom: 4% }
+ body { margin-left: 8%; margin-right: 8%; margin-top: 4%; margin-bottom: 4% }
p.blocktext { margin-left: 48pt; margin-right: 48pt }
div.blocktext { margin-left: 48pt; margin-right: 48pt }
ul.blocktext { margin-left: 48pt; margin-right: 48pt }
+ ul {list-style: disc}
ol.blocktext { margin-left: 48pt; margin-right: 48pt }
h1 { font-size: 24pt; line-height: 100% }
h2 { color: #009900 }
@@ -101,8 +102,8 @@ Loser Expo 2025 SIGN-UP Form
<td>{{ form.relation }}</td>
</tr>
</table>
-
- <table width="100%">
+ &nbsp;<br />
+ <table border="0">
<tr>
<td><b>Are you a vegetarian?</b></td>
<td><b>Are you a student/unwaged?</b></td>
@@ -112,28 +113,31 @@ Loser Expo 2025 SIGN-UP Form
<td>{{ form.student }}</td>
</tr>
+ </table>
-
+ <table border="0">
<h3>Transport</h3>
- <p>Please look now at the <a target="_blank" href="http://expo.survex.com/years/2024/travel.html">transport arrangements page</a> (will open in a new window). Then select one of the following:</p>
+ <p>Please look now at the <a target="_blank" href="/years/{{year}}/travel.html">transport arrangements page</a> (will open in a new window). Then select one of the following:</p>
<p>{{ form.transport_ok }}</p>
- <p>If your arrangements are shown incorrectly, then please state the corrected version in the box below. This will automatically be emailed to the transport co-ordinator.</p>
+ <p>If your arrangements are shown incorrectly, then please state the corrected version in the box below. </p>
<p>{{ form.transport_info }}</p>
+ </table>
+ <table border="0">
<h3>Tents</h3>
- <p>There will be two high camps in 2025:</p>
+ <p>There will be two high camps in {{year}}:</p>
<ul>
- <li>the stone bridge bivvy site;</li>
- <li>Garlic Cave.</li>
+ <li>the Stone Bridge site;</li>
+ <li>the Garlic Cave site</li>
</ul>
<p>There is space for three people in a Club tent at Base Camp. At the stone bridge, a bivvy bag is not essential but useful if you have one.</p>
<p>Will you be taking any of the following (please tick/complete as appropriate):</p>
- <p>{{ form.bivvy }}</p>
- <p>{{ form.tent }} A {{ form.top_tent_cap }} person tent for the Top Camp site.</p>
- <p>{{ form.btent }} A {{ form.base_tent_cap }} person tent for Base Camp.</p>
- <p>Leave the boxes unchecked if you require Club tent space at a particular site.</p>
+ <p>{{ form.bivvy }} Yes I have my own bivvy bag which I will use up the mountain.</p>
+ <p>{{ form.tent }} Yes, I have a {{ form.top_tent_cap }} person tent for the Top Camp site.</p>
+ <p>{{ form.btent }} Yes, I have a {{ form.base_tent_cap }} person tent for Base Camp.</p>
+ <p>Leave the tick-boxes unchecked if you require Club tent space at a particular site.</p>
<h3>Medical</h3>
<p>The medical information entered here will appear in the Bier Book. Extra medical information may be communicated to
@@ -152,15 +156,19 @@ Loser Expo 2025 SIGN-UP Form
<h2>Section B - Caving/surface work projects</h2>
<p>To assist organisation of gear, it would be helpful to know people's possible aims on Expo. Thus if you have a particular project in mind, please state it below:</p>
<p>{{ form.aims }}</p>
-
+ </table>
<hr>
<h2>All done?</h2>
- <p>Click the <b>Preview</b> button below to review your submission.</p>
- <input type="submit" value="Preview form submission">
+ <!-- <p>Click the <b>Preview</b> button below to review your submission.</p> -->
+ <div style="text-align: center">
+ <input type="submit" value="Preview / Submit">
+ </div>
</form>
-
+
+
+ &nbsp;<br />
<hr>
- <p>Please report any problems with this form to the <a href="mailto:wookey-expo@wookware.org">webmaster</a>.</p>
+ <p>Please report any problems with this form to a <a href="mailto:philip.sargent@klebos.eu">troggle nerd</a>.</p>
{% endblock %}
\ No newline at end of file