From 2a9a5210292b19ac8b070b6b61ddb586e8c3127c Mon Sep 17 00:00:00 2001 From: Chris Modjeska Date: Mon, 25 Nov 2013 08:44:55 -0500 Subject: [PATCH] Fixed: Province field can have more than 2 characters --- django_clickbank/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/django_clickbank/models.py b/django_clickbank/models.py index 0a4c513..bddd370 100644 --- a/django_clickbank/models.py +++ b/django_clickbank/models.py @@ -1,6 +1,9 @@ from django.db import models from django.conf import settings from django_clickbank.signals import * +import logging + +logger = logging.getLogger('django_clickbank.notifications') class ClickBankModel(models.Model): class Meta: @@ -133,7 +136,7 @@ class Notification(ClickBankModel): full_name = models.CharField(max_length=510) first_name = models.CharField(max_length=255, blank=True, null=True) last_name = models.CharField(max_length=255, blank=True, null=True) - province = models.CharField(max_length=2, blank=True, null=True) + province = models.CharField(max_length=255, blank=True, null=True) postal_code = models.CharField(max_length=16, blank=True, null=True) city = models.CharField(max_length=255, blank=True, null=True) country = models.CharField(max_length=255, blank=True, null=True) @@ -205,6 +208,7 @@ def send_signals(self): """ Send out neccesary signals on post_save or update """ if self.transaction_type in ('SALE', 'TEST_SALE'): + logging.debug('Sending Notification: {0}'.format(sale)) sale.send(sender=self) elif self.transaction_type == 'BILL':