unrequiring paypal address

pull/1/head
Andromeda Yelton 2012-05-08 13:48:32 -04:00
parent 9549b34d9e
commit 32a4b29e33
2 changed files with 7 additions and 0 deletions

View File

@ -109,8 +109,14 @@ class Campaign(models.Model):
left = models.DecimalField(max_digits=14, decimal_places=2, null=True, blank=False)
deadline = models.DateTimeField()
activated = models.DateTimeField(null=True)
# setting blank=True ensures that these fields are not required
# in the widget generated in forms.py -- important while we are
# running two payment processors. Should we standardize on one
# and wish to enforce it for RHs, take out blank=True.
paypal_receiver = models.CharField(max_length=100, blank=True)
amazon_receiver = models.CharField(max_length=100, blank=True)
work = models.ForeignKey("Work", related_name="campaigns", null=False)
managers = models.ManyToManyField(User, related_name="campaigns", null=False)
# status: INITIALIZED, ACTIVE, SUSPENDED, WITHDRAWN, SUCCESSFUL, UNSUCCESSFUL

View File

@ -176,6 +176,7 @@ def getManageCampaignForm ( instance, data=None, *args, **kwargs ):
label=_("email address to collect Paypal funds"),
max_length=100,
error_messages={'required': 'You must enter the email associated with your Paypal account.'},
required = False,
)
target = forms.DecimalField( min_value= D(settings.UNGLUEIT_MINIMUM_TARGET), error_messages={'required': 'Please specify a target price.'} )
edition = forms.ModelChoiceField(get_queryset(), widget=RadioSelect(),empty_label='no edition selected')