diff --git a/pinaxcon/registrasion/models.py b/pinaxcon/registrasion/models.py index c8a2a1dd976d777f1c7abdd32818c686aabeb850..b09a9810833e44c6dca1ed2c72b8787921f136d7 100644 --- a/pinaxcon/registrasion/models.py +++ b/pinaxcon/registrasion/models.py @@ -55,6 +55,12 @@ class AttendeeProfile(rego.AttendeeProfileBase): "Please fill in line 1 before filling line 2", )) + if not self.agreement: + errors.append(( + "agreement", + "You must accept the agreement.", + )) + if errors: raise ValidationError(dict(errors)) @@ -137,3 +143,12 @@ class AttendeeProfile(rego.AttendeeProfileBase): "announcements newsletter", blank=True, ) + + agreement = models.BooleanField( + verbose_name="Agreement", + help_text="I agree to act according to the " + "North Bay Python Code of Conduct. I also agree with the " + "North Bay Python Terms and Conditions.", + blank=False, + default=False, + )