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
...
 
@@ -63,12 +63,18 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
        if self.address_line_2 and not self.address_line_1:
 
            errors.append((
 
                "address_line_1",
 
                "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))
 

	
 
    def save(self):
 
        if not self.name_per_invoice:
 
            self.name_per_invoice = self.name
...
 
@@ -135,12 +141,13 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    country = CountryField(
 
        default="AU",
 
    )
 
    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,
 
    )
 

	
 
    of_legal_age = models.BooleanField(
 
        verbose_name="Are you over 18?",
 
        help_text="Being under 18 will not stop you from attending the "
...
 
@@ -191,12 +198,23 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
        help_text="Select to have your login details made available to future "
 
                  "Linux Australia conferences who share the same Single Sign "
 
                  "On system.",
 
        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,
 
        verbose_name="Which past linux.conf.au events have you attended?",
 
        blank=True,
 
    )
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)