Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
For calculating the weight of a product or basket

src/d/j/django-oscar-0.7/oscar/apps/shipping/models.py   django-oscar(Download)
from django.utils.translation import ugettext_lazy as _
 
from oscar.apps.shipping import Scales
from oscar.models.fields import AutoSlugField
 
    def charge_incl_tax(self):
        # Note, when weighing the basket, we don't check whether the item
        # requires shipping or not.  It is assumed that if something has a
        # weight, then it requires shipping.
        scales = Scales(attribute_code=self.weight_attribute,