File diff c1fab4fcc263 → 737db640aaeb
pinaxcon/registrasion/models.py
Show inline comments
 
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. '''
 
        return "name"
 

	
 
    def invoice_recipient(self):
 
        if self.company:
 
            base = "\n%(company)s\nAttention: %(name_per_invoice)s"
 
        else:
...
 
@@ -65,18 +77,21 @@ class AttendeeProfile(rego.AttendeeProfileBase):
 
    dietary_requirements = models.CharField(
 
        max_length=256,
 
        blank=True,
 
    )
 
    accessibility_requirements = models.CharField(
 
        max_length=256,
 
        blank=True,
 
    )
 
    gender = models.CharField(
 
        max_length=64,
 
        blank=True,
 
    )
 
    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.