2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 11:28:23 +00:00

Blrubfile field

This commit is contained in:
2025-07-21 21:03:56 +02:00
parent 9a3651ed8b
commit 833aeaeeba
4 changed files with 52 additions and 50 deletions

View File

@@ -100,7 +100,7 @@ class Person(TroggleModel):
default=False,
)
is_guest = models.BooleanField(default=False) # This is per-Person, not per-PersonExpedition
mug_shot = models.CharField(max_length=100, blank=True, null=True)
mugshot = models.CharField(max_length=100, blank=True, null=True)
blurbfile = models.CharField(max_length=100, blank=True, null=True)
blurb = models.TextField(blank=True, null=True)
orderref = models.CharField(max_length=200, blank=True) # for alphabetic

View File

@@ -163,7 +163,7 @@ def folk_export(request):
newfile = settings.EXPOWEB / 'folk' / 'new_folk.csv'
with open(newfile, 'w') as f:
f.write("Name,Lastname,Guest,VfHO member,Mugshot")
f.write("Name,Lastname,Guest,VfHO member,Mugshot,Blurbfile")
for y in yearlist:
try:
expo[y] = Expedition.objects.get(year=y)
@@ -184,9 +184,11 @@ def folk_export(request):
f.write(",1")
else:
f.write(",")
if person.mug_shot:
f.write(f",{person.mug_shot.replace("/folk/","")}")
elif person.blurbfile:
if person.mugshot:
f.write(f",{person.mugshot.replace("/folk/","")}")
else:
f.write(",")
if person.blurbfile:
f.write(f",{person.blurbfile.replace("/folk/","")}")
else:
f.write(",")