Commits

Josh VanderLinden committed b7e8f1e

Added some extra logging

  • Participants
  • Parent commits 474ae67

Comments (0)

Files changed (2)

+# HG changeset patch
+# Parent d994147968957215d97f1fe2d5f4a1a73bd7295a
+
+diff -r d99414796895 satchmo/apps/product/modules/downloadable/listeners.py
+--- a/satchmo/apps/product/modules/downloadable/listeners.py	Tue Dec 13 22:48:24 2011 -0500
++++ b/satchmo/apps/product/modules/downloadable/listeners.py	Wed Dec 14 00:49:49 2011 -0500
+@@ -31,6 +31,7 @@
+ def create_download_link(product=None, order=None, subtype=None, **kwargs):
+     """Creates a download link for a Downloadable Product on order success."""
+     if product and order and subtype == "download":
++        log.debug('Creating download links for product %s / order %s' % (product, order))
+         new_link = DownloadLink(downloadable_product=product, order=order,
+             key=product.create_key(), num_attempts=0)
+         new_link.save()
+diff -r d99414796895 satchmo/apps/product/modules/downloadable/models.py
+--- a/satchmo/apps/product/modules/downloadable/models.py	Tue Dec 13 22:48:24 2011 -0500
++++ b/satchmo/apps/product/modules/downloadable/models.py	Wed Dec 14 00:49:49 2011 -0500
+@@ -12,11 +12,14 @@
+ from satchmo_store.shop.models import Order
+ from satchmo_utils import normalize_dir
+ import datetime
++import logging
+ import os
+ import random
+ 
+ SATCHMO_PRODUCT=True
+ 
++log = logging.getLogger('product.modules.downloadable.models')
++
+ def get_product_types():
+     return ('DownloadableProduct',)
+ 
+@@ -58,6 +61,7 @@
+         return download_key
+ 
+     def order_success(self, order, order_item):
++        log.debug('Triggering subtype_order_success on a downloadable product')
+         signals.subtype_order_success.send(self, product=self, order=order, subtype="download")
+ 
+     class Meta:
 affiliates
 moneybookers
 product_keywords
+logging
 # Placed by Bitbucket