summaryrefslogtreecommitdiff
path: root/payments/forms.py
diff options
context:
space:
mode:
authorMichał Ociepka <michal@ociepka.info>2013-11-07 13:33:59 +0100
committerMichał Ociepka <michal@ociepka.info>2013-11-07 13:33:59 +0100
commitb605a38cfa2254f306442672d09ad7c08025c00e (patch)
tree666af7eeeee6d3cc35db762bcbb21aa136e990ff /payments/forms.py
parent470e8b0971757ccecd2e769c911f6d048fff0a3c (diff)
downloaddjango-payments-taler-b605a38cfa2254f306442672d09ad7c08025c00e.tar.gz
django-payments-taler-b605a38cfa2254f306442672d09ad7c08025c00e.tar.bz2
django-payments-taler-b605a38cfa2254f306442672d09ad7c08025c00e.zip
Move the expiration widget rendering to template
Diffstat (limited to 'payments/forms.py')
-rw-r--r--payments/forms.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/payments/forms.py b/payments/forms.py
index fcf0d9a..480d6c4 100644
--- a/payments/forms.py
+++ b/payments/forms.py
@@ -1,7 +1,8 @@
from django import forms
from django.utils.translation import ugettext_lazy as _
-from .fields import CreditCardNumberField, CreditCardExpiryField, CreditCardVerificationField
+from .fields import (CreditCardNumberField, CreditCardExpiryField,
+ CreditCardVerificationField)
class PaymentForm(forms.Form):
@@ -36,9 +37,13 @@ class CreditCardPaymentForm(PaymentForm):
number = CreditCardNumberField(label=_('Card Number'), max_length=32,
required=True)
expiration = CreditCardExpiryField()
- cvv2 = CreditCardVerificationField(label=_('CVV2 Security Number'), required=False)
+ cvv2 = CreditCardVerificationField(
+ label=_('CVV2 Security Number'), required=False, help_text=_(
+ 'Last three digits located on the back of your card.'
+ ' For American Express the four digits found on the front side.'))
def __init__(self, *args, **kwargs):
- super(CreditCardPaymentForm, self).__init__(hidden_inputs=False, *args, **kwargs)
+ super(CreditCardPaymentForm, self).__init__(
+ hidden_inputs=False, *args, **kwargs)
if hasattr(self, 'VALID_TYPES'):
self.fields['number'].valid_types = self.VALID_TYPES