Changeset - 4605ee0d98ce
[Not reviewed]
0 1 2
James Polley - 7 years ago 2017-09-30 08:45:50
jp@jamezpolley.com
Require attendees to agree to Code of Conduct
3 files changed with 64 insertions and 0 deletions:
0 comments (0 inline, 0 general)
pinaxcon/registrasion/migrations/0007_auto_20170930_1610.py
Show inline comments
 
new file 100644
 
# -*- 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'),
 
        ),
 
    ]
pinaxcon/registrasion/models.py
Show inline comments
...
 
@@ -66,6 +66,12 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
                "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:
 
            raise ValidationError(dict(errors))
 

	
...
 
@@ -138,6 +144,7 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    state = models.CharField(
 
        max_length=256,
 
        verbose_name="State/Territory/Province",
 
        help_text="If your Country is Australia, you must list a state.",
 
        blank=True,
 
    )
 

	
...
 
@@ -194,6 +201,17 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
        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(
 
        PastEvent,
vendor/registrasion/registrasion/migrations/0008_auto_20170930_1843.py
Show inline comments
 
new file 100644
 
# -*- 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'),
 
        ),
 
    ]
0 comments (0 inline, 0 general)