Site Sections: Satchmo Main | Wiki | Demo Store |

Changeset 1578

Show
Ignore:
Timestamp:
10/01/08 02:28:06 (2 months ago)
Author:
chris
Message:

Fix a couple of bugs with downloadable products. Closes #593

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • satchmo/trunk/satchmo/payment/views

    • Property svn:ignore set to
      *.pyc
  • satchmo/trunk/satchmo/product/models.py

    r1567 r1578  
    1111import sha 
    1212import signals 
     13import os.path 
    1314 
    1415from django.conf import settings 
     
    11141115    raw = config_value_safe('PRODUCT', 'PROTECTED_DIR', 'images/') 
    11151116    updir = normalize_dir(raw) 
    1116     return updir 
     1117    return os.path.join(updir, os.path.basename(filename)) 
    11171118 
    11181119class DownloadableProduct(models.Model): 
     
    11211122    """ 
    11221123    product = models.OneToOneField(Product, verbose_name=_("Product"), primary_key=True) 
    1123     file = FileField(_("File"), upload_to=_protected_dir), 
     1124    file = FileField(_("File"), upload_to=_protected_dir) 
    11241125    num_allowed_downloads = models.IntegerField(_("Num allowed downloads"), help_text=_("Number of times link can be accessed.")) 
    11251126    expire_minutes = models.IntegerField(_("Expire minutes"), help_text=_("Number of minutes the link should remain active.")) 
  • satchmo/trunk/satchmo/shop/models.py

    r1571 r1578  
    1818from django.db import models 
    1919from django.utils.encoding import force_unicode 
     20from django.core import urlresolvers  
    2021from django.utils.safestring import mark_safe 
    2122from django.utils.translation import ugettext, ugettext_lazy as _