Did I find the right examples for you? yes no

All Samples(21)  |  Call(16)  |  Derive(0)  |  Import(5)

src/l/f/lfs-buildout-development-HEAD/scripts/load_data.py   lfs-buildout-development(Download)
from lfs.core.fields.thumbs import ImageWithThumbsField
from lfs.marketing.models import Topseller, FeaturedProduct
from lfs.criteria.models import WeightCriterion, CriteriaObjects, CountryCriterion
from lfs.criteria.settings import LESS_THAN_EQUAL, IS, IS_NOT, GREATER_THAN
from lfs.shipping.models import ShippingMethod, ShippingMethodPrice
                                                             delivery_time=delivery_time, priority=1)
 
    co = CriteriaObjects(criterion=cc_ie_uk, content=smp_1095)
    co.save()
 
    co = CriteriaObjects(criterion=cc_not_ie_uk, content=smp_1500)

src/d/j/django-lfs-0.7.7/lfs/shipping/tests.py   django-lfs(Download)
from lfs.shipping import utils
from lfs.criteria.models import UserCriterion
from lfs.criteria.models import CriteriaObjects
from lfs.criteria.models import CartPriceCriterion
from lfs.criteria.models import WeightCriterion
        # Create a weigth criterion and add it to the shipping method 1.
        c = WeightCriterion.objects.create(weight=10.0, operator=GREATER_THAN)
        co = CriteriaObjects(criterion=c, content=self.sm1)
        co.save()
 
        # Create a weigth criterion and add it to the shipping method 2.
        c = WeightCriterion.objects.create(weight=10.0, operator=LESS_THAN)
        co = CriteriaObjects(criterion=c, content=self.sm2)
        # means sm1 is not valid anymore for p1.
        c = WeightCriterion.objects.create(weight=10.0, operator=GREATER_THAN)
        co = CriteriaObjects(criterion=c, content=self.sm1)
        co.save()
 
        # Create a cart price criterion and add it to the shipping method 1
        c = CartPriceCriterion.objects.create(price=10.0, operator=GREATER_THAN)
        co = CriteriaObjects(criterion=c, content=self.sm1)
        co.save()
 

src/l/f/lfs-HEAD/shipping/tests.py   lfs(Download)
from lfs.shipping import utils
from lfs.criteria.models import UserCriterion
from lfs.criteria.models import CriteriaObjects
from lfs.criteria.models import CartPriceCriterion
from lfs.criteria.models import WeightCriterion
        # Create a weigth criterion and add it to the shipping method 1.
        c = WeightCriterion.objects.create(weight=10.0, operator=GREATER_THAN)
        co = CriteriaObjects(criterion=c, content=self.sm1)
        co.save()
 
        # means sm1 is not valid anymore for p1.
        c = WeightCriterion.objects.create(weight=10.0, operator=GREATER_THAN)
        co = CriteriaObjects(criterion=c, content=self.sm1)
        co.save()
 
        # Create a cart price criterion and add it to the shipping method 1
        c = CartPriceCriterion.objects.create(price=10.0, operator=GREATER_THAN)
        co = CriteriaObjects(criterion=c, content=self.sm1)
        co.save()
 
        # Create a weigth criterion and add it to the shipping method 1.
        c = WeightCriterion.objects.create(weight=10.0, operator=GREATER_THAN)
        co = CriteriaObjects(criterion=c, content=self.sm1)
        co.save()
 

src/d/j/django-lfs-0.7.7/lfs/discounts/tests.py   django-lfs(Download)
from lfs.order.utils import add_order
from lfs.criteria.models import WeightCriterion
from lfs.criteria.models import CriteriaObjects
from lfs.criteria.settings import GREATER_THAN, LESS_THAN
from lfs.discounts.models import Discount
    def test_criteria(self):
        """
        """
        c = WeightCriterion.objects.create(weight=10.0, operator=GREATER_THAN)
        co = CriteriaObjects(criterion=c, content=self.d)

src/l/f/lfs_criterion_extra-0.2.0/lfs_criterion_extra/monkey.py   lfs_criterion_extra(Download)
 
#lfs imports
from lfs.criteria.models import CriteriaObjects
from lfs.criteria.models.criteria import Criterion as BaseCriterion
from lfs.criteria.models.criteria import CountryCriterion