shoop.simple_pricing package

Submodules

shoop.simple_pricing.admin_form_part module

class shoop.simple_pricing.admin_form_part.SimplePricingForm(**kwargs)[source]

Bases: django.forms.forms.Form

save()[source]
get_shop_group_field(shop, group)[source]
base_fields = OrderedDict()
declared_fields = OrderedDict()
media
class shoop.simple_pricing.admin_form_part.SimplePricingFormPart(request, object=None)[source]

Bases: shoop.admin.form_part.FormPart

priority = 10
get_form_defs()[source]
form_valid(form)[source]

shoop.simple_pricing.api module

shoop.simple_pricing.api.populate_simple_pricing_api(router)[source]
Parameters:router (rest_framework.routers.DefaultRouter) – Router

shoop.simple_pricing.models module

class shoop.simple_pricing.models.SimpleProductPrice(id, product, shop, group, price_value)[source]

Bases: shoop.utils.properties.MoneyPropped, django.db.models.base.Model

product
shop
group
price

Property for Price object.

Similar to MoneyProperty but also has includes_tax field.

Operaters with TaxfulPrice and TaxlessPrice objects.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception SimpleProductPrice.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

SimpleProductPrice.objects = <django.db.models.manager.Manager object>

shoop.simple_pricing.module module

class shoop.simple_pricing.module.SimplePricingContext(**kwargs)[source]

Bases: shoop.core.pricing.PricingContext

REQUIRED_VALUES = ('customer_group_ids', 'shop')
customer_group_ids = ()
shop = None
class shoop.simple_pricing.module.SimplePricingModule[source]

Bases: shoop.core.pricing.PricingModule

identifier = 'simple_pricing'
name = <django.utils.functional.lazy.<locals>.__proxy__ object>
pricing_context_class

alias of SimplePricingContext

get_context_from_request(request)[source]
get_price_info(context, product, quantity=1)[source]

Module contents

class shoop.simple_pricing.ShoopSimplePricingAppConfig(*args, **kwargs)[source]

Bases: shoop.apps.AppConfig

name = 'shoop.simple_pricing'
verbose_name = 'Shoop Simple Pricing'
label = 'simple_pricing'
provides = {'admin_product_form_part': ['shoop.simple_pricing.admin_form_part:SimplePricingFormPart'], 'pricing_module': ['shoop.simple_pricing.module:SimplePricingModule'], 'api_populator': ['shoop.simple_pricing.api:populate_simple_pricing_api']}