Пример #1
0
class WritersModule(Module.imports('%s.internal.writers' % __name__)):
    @cached_property
    def OrderConfirmationMailWriter(self):
        return import_string(
            get_setting(
                'ORDER_CONFIRMATION_MAIL_WRITER',
                default='%s.internal.writers.OrderConfirmationMailWriter' %
                __name__))

    @cached_property
    def OrderNotificationMailWriter(self):
        return import_string(
            get_setting(
                'INVOICE_MAIL_WRITER',
                default='%s.internal.writers.OrderNotificationMailWriter' %
                __name__))

    @cached_property
    def ShippingNotificationMailWriter(self):
        return import_string(
            get_setting(
                'SHIPPING_NOTIFICATION_MAIL_WRITER',
                default='%s.internal.writers.ShippingNotificationMailWriter' %
                __name__))
Пример #2
0
from django.utils.module_loading import import_string


class FormsModule(Module.imports('%s.internal.forms' % __name__)):

    @cached_property
    def AddToCartForm(self): # NOQA
        return import_string(
            get_setting(
                'ADD_TO_CART_FORM',
                default='%s.internal.forms.AddToCartForm' % __name__
            )
        )

    @cached_property
    def EditPurchaseForm(self): # NOQA
        return import_string(
            get_setting(
                'EDIT_PURCHASE_FORM',
                default='%s.internal.forms.EditPurchaseForm' % __name__
            )
        )


ModelsModule = Module.imports('%s.internal.models' % __name__)

models = ModelsModule('%s.models' % __name__)
forms = FormsModule('%s.forms' % __name__)

default_app_config = '%s.apps.DefaultConfig' % __name__
Пример #3
0
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.

# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.

# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.

# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

from sellmo.core.registry import Module

ModelsModule = Module.imports("%s.internal.models" % __name__)

models = ModelsModule("%s.models" % __name__)

default_app_config = "%s.apps.DefaultConfig" % __name__
Пример #4
0
    def OrderConfirmationMailWriter(self):
        return import_string(
            get_setting(
                'ORDER_CONFIRMATION_MAIL_WRITER',
                default='%s.internal.writers.OrderConfirmationMailWriter' %
                __name__))

    @cached_property
    def OrderNotificationMailWriter(self):
        return import_string(
            get_setting(
                'INVOICE_MAIL_WRITER',
                default='%s.internal.writers.OrderNotificationMailWriter' %
                __name__))

    @cached_property
    def ShippingNotificationMailWriter(self):
        return import_string(
            get_setting(
                'SHIPPING_NOTIFICATION_MAIL_WRITER',
                default='%s.internal.writers.ShippingNotificationMailWriter' %
                __name__))


ModelsModule = Module.imports('%s.internal.models' % __name__)

writers = WritersModule('%s.writers' % __name__)
models = ModelsModule('%s.models' % __name__)

default_app_config = '%s.apps.DefaultConfig' % __name__
Пример #5
0
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.

# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.

# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

from sellmo.core.registry import Module

from .price import * # NOQA
from .fields import * # NOQA
from .currency import * # NOQA

IndexesModule = Module.imports('%s.internal.indexes' % __name__)

indexes = IndexesModule('%s.indexes' % __name__)

default_app_config = '%s.apps.DefaultConfig' % __name__