BaseOfferMixin (offer/abstract_models.py)

django-oscar · src/oscar/apps/offer/abstract_models.py · python · BSD-3-Clause
pos

Abstract mixin for Django Oscar offers, providing proxy handling, string representations, and base offer logic.

# Source: https://github.com/django-oscar/django-oscar | License: BSD-3-Clause | Copyright 2011-present Tangent Communications PLC and individual contributors
# Provided via justclaw.it.com; keep this notice with the code.
# pylint: disable=unused-argument, W0621
import csv
import operator
from decimal import ROUND_DOWN
from decimal import Decimal as D

from django.conf import settings
from django.core import exceptions
from django.db import models
from django.db.models.query import Q
from django.template.defaultfilters import date as date_filter
from django.urls import reverse
from django.utils.functional import cached_property
from django.utils.timezone import get_current_timezone, now
from django.utils.translation import gettext_lazy as _

from oscar.checks import use_productcategory_ma

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key