urls and shop.models bugs

Issue #842 invalid
Anonymous created an issue

1 in satchmo.urls:

    (r'^site_media/(.*)$', 'django.views.static.serve', 
    {'document_root': settings.MEDIA_ROOT}),

Something to consider, perhaps? : http://docs.djangoproject.com/en/dev/howto/static-files/#the-big-fat-disclaimer

2 in shop/models.py Cart:

def _get_shippable(self):

    """Return whether the cart contains shippable items."""

    for cartitem in self.cartitem_set.all():

        if cartitem.is_shippable:

            return True   # How so???

    return False

is_shippable = property(_get_shippable)

Comments (2)

  1. Michał Sałaban

    1. Look, this is enclosed in a conditional checking for LOCAL_DEV flag, which is supposed to be turned off on production sites.

    2. The word 'shippable' is a bit misleading here. It means rather 'requires shipping'. For example, downloadable items are not shippable in Satchmo's terms, because they will be accessible from the website and do not require shipping procedure. Therefore, if the Cart contents are mixed (physical and downloadable products), the whole cart is considered shippable.

    This may be a good idea to change the naming there, however the code works well.

  2. Log in to comment