from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from registrasion import models as rego
@python_2_unicode_compatible
class DynamicValues(models.Model):
name = models.CharField(max_length=64)
value = models.IntegerField()
def __str__(self):
return "%s - %d" % (self.name, self.value)
class AttendeeProfile(rego.AttendeeProfileBase):
@classmethod
def name_field(cls):
''' This is used to pre-fill the attendee's name from the
speaker profile. If it's None, that functionality is disabled. '''
@@ -71,12 +83,15 @@ class AttendeeProfile(rego.AttendeeProfileBase):
blank=True,
)
gender = models.CharField(
max_length=64,
db_defined_values = models.ManyToManyField(
DynamicValues
class DemoPayment(rego.PaymentBase):
''' A subclass of PaymentBase for use in our demo payments function. '''
pass # No custom features here, but yours could be here.