add new fields for the people page

This commit is contained in:
Thomas Steen Rasmussen 2017-07-11 17:30:18 +02:00
parent 124b8a6afd
commit a96d9f74be
2 changed files with 36 additions and 0 deletions

View File

@ -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.'),
),
]

View File

@ -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