All pastes #216916 Raw Edit

Untitled

public text v1 · immutable
#216916 ·published 2006-10-23 11:06 UTC
rendered paste body

DELIVERY_MODIFIER_OPERATOR_CHOICES = (
    ('+','+'),
    ('*','×'),
    ('-','-'),
    ('/','÷'),
)

ORDER_METHOD_CHOICES = (
    ('email','email'),
    ('fax','fax'),
    ('text','fax'),
    ('phone','phone'),
    ('post','post'),
    ('online','online')
)

PAYMENT_METHOD_CHOICES = (
    ('credit card', 'credit card'),
    ('debit', 'debit'),
    ('paypal', 'paypal'),
    ('cheque', 'cheque')
)

OPTION_TYPES = (
    ('BOOLEAN', 'BOOLEAN'),
    ('STRING', 'STRING'),
    ('INTEGER', 'INTEGER'),
    ('FLOAT', 'FLOAT')
)



class Supplier(models.Model):
    address = models.ForeignKey(Address, blank=True, null=True)
    name = models.CharField(maxlength=255)
    website = models.URLField(blank=True,null=True)
    email = models.EmailField(255, blank=True, null=True)
    fax = models.CharField(maxlength=255, blank=True, null=True)
    mobile = models.CharField(maxlength=255, blank=True, null=True)
    usual_order_method = models.CharField(maxlength=5, choices=ORDER_METHOD_CHOICES)
    usual_payment_method = models.CharField(maxlength=6, choices=PAYMENT_METHOD_CHOICES)
    typical_delivery_days = models.PositiveIntegerField()

    def __str__(self):
        return self.name
    
    class Admin:
        pass