From a96d9f74be1b090e71b1e669ec7bd62f2e5c737e Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 11 Jul 2017 17:30:18 +0200 Subject: [PATCH] add new fields for the people page --- .../migrations/0005_auto_20170711_1721.py | 25 +++++++++++++++++++ src/profiles/models.py | 11 ++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/profiles/migrations/0005_auto_20170711_1721.py diff --git a/src/profiles/migrations/0005_auto_20170711_1721.py b/src/profiles/migrations/0005_auto_20170711_1721.py new file mode 100644 index 00000000..533bd84e --- /dev/null +++ b/src/profiles/migrations/0005_auto_20170711_1721.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-07-11 15:21 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('profiles', '0004_auto_20170430_1408'), + ] + + operations = [ + migrations.AddField( + model_name='profile', + name='public_credit_name', + field=models.CharField(blank=True, help_text='The name used on the public list of volunteers for this event. Only used if public_credits is True. Not editable by users (to avoid getting junk on the website).', max_length=100), + ), + migrations.AddField( + model_name='profile', + name='public_credits', + field=models.BooleanField(default=False, help_text='Check this box if you want your name to appear in the list of volunteers for this event. Please inform your team responsible what you would like to be credited as.'), + ), + ] diff --git a/src/profiles/models.py b/src/profiles/models.py index aaae85e2..49325c36 100644 --- a/src/profiles/models.py +++ b/src/profiles/models.py @@ -31,6 +31,17 @@ class Profile(CreatedUpdatedModel, UUIDModel): help_text='Please include any info you think could be relevant, like drivers license, first aid certificates, crafts, skills and previous experience. Please also include availability if you are not there for the full week.', ) + public_credits = models.BooleanField( + default=False, + help_text='Check this box if you want your name to appear in the list of volunteers for this event. Please inform your team responsible what you would like to be credited as.' + ) + + public_credit_name = models.CharField( + blank=True, + max_length=100, + help_text='The name used on the public list of volunteers for this event. Only used if public_credits is True. Not editable by users (to avoid getting junk on the website).' + ) + @property def email(self): return self.user.email