Commits

Bruce Kroeze  committed d5a2c88

removing satchmo references

  • Participants
  • Parent commits 126474e

Comments (0)

Files changed (3)

File bursar/fields.py

-from payment.config import credit_choices, labelled_gateway_choices
 from django import forms
 from django.db import models
 from django.db.models.fields import DecimalField
 from widgets import CurrencyWidget
 
-class CreditChoiceCharField(models.CharField):
-
-    def __init__(self, choices="__DYNAMIC__", *args, **kwargs):
-        if choices == "__DYNAMIC__":
-            kwargs['choices'] = credit_choices()
-
-        super(CreditChoiceCharField, self).__init__(*args, **kwargs)
-
 
 class CurrencyField(DecimalField):
 
         return super(CurrencyField, self).formfield(**defaults)
 
 
-class PaymentChoiceCharField(models.CharField):
-
-    def __init__(self, choices="__DYNAMIC__", *args, **kwargs):
-        if choices == "__DYNAMIC__":
-            kwargs['choices'] = labelled_gateway_choices()
-
-        super(PaymentChoiceCharField, self).__init__(*args, **kwargs)
-        
 class RoundedDecimalField(forms.Field):
     def clean(self, value):
         """

File bursar/gateway/paypal_gateway/templates/bursar/gateway/paypal_gateway/_paypal_simple_form.html

+{% load paypal_tags i18n %}
+<form action="{{ gateway.submit_url }}" method="post">
+{% paypal_submit_form gateway purchase %}
+<input type="image" src="{% paypal_submit_button_url gateway purchase %}" alt="{% trans "Purchase Items" %}" />
+</form>

File bursar/models.py

 Also stores credit card info in an encrypted format.
 """
 
-from bursar.fields import PaymentChoiceCharField, CreditChoiceCharField, CurrencyField
+from bursar.fields import CurrencyField
 from bursar.bursar_settings import get_bursar_setting
 from Crypto.Cipher import Blowfish
 from datetime import datetime
 # ----------------------
 
 class PaymentBase(models.Model):
-    method = PaymentChoiceCharField(_("Payment Method"),
+    method = CharField(_("Payment Method"),
         max_length=25, blank=True)
     amount = CurrencyField(_("amount"), 
         max_digits=18, decimal_places=2, blank=True, null=True)
     displayable number.
     """
     payment = models.OneToOneField('Payment', related_name="creditcard")
-    credit_type = CreditChoiceCharField(_("Credit Card Type"), max_length=16)
+    credit_type = models.CharField(_("Credit Card Type"), max_length=16)
     display_cc = models.CharField(_("CC Number (Last 4 digits)"),
         max_length=4, )
     encrypted_cc = models.CharField(_("Encrypted Credit Card"),