: The attendee registering must use one of the accounts that
are listed as staff in the [conference configuration](configuring).
+CFP team member
+: The attendee registering must use one of the accounts that
+are listed as talkvoter in the [conference configuration](configuring).
+
Must have voucher
: The registration must be done using a voucher. Vouchers in turn are tied to
a specific registration type, so using this makes it possible to say only
migrations.AlterField(
model_name='registrationtype',
name='specialtype',
- field=models.CharField(blank=True, choices=[('man', 'Manually confirmed'), ('spk', 'Confirmed speaker'), ('spkr', 'Confirmed or reserve speaker'), ('staff', 'Confirmed staff'), ('vch', 'Requires specific voucher')], max_length=5, null=True, verbose_name='Special type'),
+ field=models.CharField(blank=True, choices=[('cfp', 'CFP team member'), ('man', 'Manually confirmed'), ('spk', 'Confirmed speaker'), ('spkr', 'Confirmed or reserve speaker'), ('staff', 'Confirmed staff'), ('vch', 'Requires specific voucher')], max_length=5, null=True, verbose_name='Special type'),
),
]
}
+def validate_cfpmember_registration(reg):
+ if reg.attendee is None:
+ raise ValidationError('CFP team member registrations have to be done by the attendee directly')
+ if not reg.conference.talkvoters.filter(pk=reg.attendee.pk).exists():
+ raise ValidationError('This registration type is only available if you are confirmed CFP team member at this conference')
+
+
+_specialregtypes['cfp'] = {
+ 'name': 'CFP team member',
+ 'func': validate_cfpmember_registration,
+ }
+
+
def validate_manual_registration(reg):
# Always validates so we can save the record, and then we just block
# it at confirmation. This doesn't work well with multiregs, so just