Commits

Bruce Kroeze  committed f9f4d2e

removing more satchmo cruft

  • Participants
  • Parent commits a438e7a

Comments (0)

Files changed (7)

File bursar/bursar_settings.py

 from django.conf import settings
 
 working_bursar_settings = {
-    'STORE_CREDIT_NUMBERS' : False
+    'STORE_CREDIT_NUMBERS' : False,
+    'CURRENCY' : '$' # Use a '_' for force a space
 }
 
 if hasattr(settings, 'BURSAR_SETTINGS'):

File bursar/bursar_settings_customize.py

 from django.utils.translation import ugettext_lazy as _
 
 BURSAR_SETTINGS = {
+    'STORE_CREDIT_NUMBERS' : False,
+    'CURRENCY' : '$' # Use a '_' for force a space
     'AUTHORIZENET' : {
         'LIVE' : False,
         'SIMULATE' : False,

File bursar/gateway/dummy_gateway/processor.py

         return True
 
     def capture_payment(self, testing=False, purchase=None, amount=NOTSET):
-        """
-        Process the transaction and return a ProcessorResult:
-
-        Example:
-        >>> from livesettings import config_get_group
-        >>> settings = config_get_group('PAYMENT_DUMMY')
-        >>> from bursar.gateway.dummy.processor import PaymentProcessor
-        >>> processor = PaymentProcessor(settings.dict_values())
-        # If using a normal payment gateway, data should be an Order object.
-        >>> data = {}
-        >>> processor.prepare_data(data)
-        >>> processor.process()
-        ProcessorResult: DUMMY [Success] Success
+        """Process the transaction and return a ProcessorResult:
         """
         assert(purchase)
         payment = self.record_payment(amount=amount, reason_code="0", purchase=purchase)

File bursar/models.py

 from django.utils.safestring import mark_safe
 from django.utils.translation import ugettext_lazy as _
 import base64
-import keyedcache
 import logging
 import operator
 
 # ----------------------
 
 class PaymentBase(models.Model):
-    method = CharField(_("Payment Method"),
+    method = models.CharField(_("Payment Method"),
         max_length=25, blank=True)
     amount = CurrencyField(_("amount"), 
         max_digits=18, decimal_places=2, blank=True, null=True)

File bursar/numbers.py

 from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, InvalidOperation, getcontext
 from django import forms
 from django.utils.translation import ugettext as _
-from livesettings import config_value
 import logging
 
 log = logging.getLogger('bursar.numbers')

File bursar/widgets.py

+from bursar.bursar_settings import get_bursar_setting
 from bursar.numbers import round_decimal
 from decimal import Decimal
 from django import forms
 from django.utils.safestring import mark_safe
 from django.utils.translation import ugettext_lazy as _
-from livesettings import config_value
 import logging
 
 log = logging.getLogger('satchmo_utils.widgets')
         if value != '':
             value = _render_decimal(value, places=8)
         rendered = super(CurrencyWidget, self).render(name, value, attrs)
-        curr = config_value('LANGUAGE','CURRENCY')
+        curr = get_bursar_setting('CURRENCY')
         curr = curr.replace("_", " ")
         return mark_safe('<span class="currency">%s</span>%s' % (curr, rendered))
 

File projects/tests/localsite/urls.py

 from django.conf.urls.defaults import *
 
-
 urlpatterns = patterns('',
     (r'example/', 'tests.localsite.views.example', {}),
 )