Require attendees to agree to Code of Conduct

This commit is contained in:
James Polley 2017-09-30 18:14:46 +10:00
parent 9d7be5f6df
commit 4605ee0d98
3 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-30 06:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pinaxcon_registrasion', '0006_auto_20170927_2301'),
]
operations = [
migrations.AddField(
model_name='attendeeprofile',
name='agreement',
field=models.BooleanField(default=False, help_text='I agree to the <a href="https://linux.conf.au/attend/terms-and-conditions"> terms and conditions of attendance</a>, and I have read, understood, and agree to act according to the standards set forth in our <a href="https://linux.conf.au/attend/code-of-conduct">Code of Conduct</a>.'),
preserve_default=False,
),
migrations.AlterField(
model_name='attendeeprofile',
name='state',
field=models.CharField(blank=True, help_text='If your Country is Australia, you must list a state.', max_length=256, verbose_name='State/Territory/Province'),
),
]

View file

@ -66,6 +66,12 @@ class AttendeeProfile(rego.AttendeeProfileBase):
"Please fill in line 1 before filling line 2", "Please fill in line 1 before filling line 2",
)) ))
if not self.agreement:
errors.append((
"agreement",
"Agreement to the terms and conditions and to the Code of Conduct is required.",
))
if errors: if errors:
raise ValidationError(dict(errors)) raise ValidationError(dict(errors))
@ -138,6 +144,7 @@ class AttendeeProfile(rego.AttendeeProfileBase):
state = models.CharField( state = models.CharField(
max_length=256, max_length=256,
verbose_name="State/Territory/Province", verbose_name="State/Territory/Province",
help_text="If your Country is Australia, you must list a state.",
blank=True, blank=True,
) )
@ -194,6 +201,17 @@ class AttendeeProfile(rego.AttendeeProfileBase):
blank=True, blank=True,
) )
agreement = models.BooleanField(
blank=False,
help_text="I agree to the "
"<a href=\"https://linux.conf.au/attend/terms-and-conditions\"> "
"terms and conditions of attendance</a>, and I have read, "
"understood, and agree to act according to the standards set "
"forth in our "
"<a href=\"https://linux.conf.au/attend/code-of-conduct\">"
"Code of Conduct</a>."
)
past_lca = models.ManyToManyField( past_lca = models.ManyToManyField(
PastEvent, PastEvent,

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-30 08:43
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('registrasion', '0007_merge_20170929_2331'),
]
operations = [
migrations.AlterField(
model_name='attendee',
name='guided_categories_complete',
field=models.ManyToManyField(blank=True, to='registrasion.Category'),
),
]