Esempio n. 1
0
    def INSTALLED_APPS(self):
        from oscar import get_core_apps

        return (
            self.REQUIRED_APPS
            + ["django.contrib.flatpages", "compressor"]
            + fp.get_fancypages_apps(use_with_oscar=True)
            + get_core_apps()
        )
Esempio n. 2
0
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.sites',
    #'compressor',
    'widget_tweaks',
    'eupagoapps.bids',
    'storages',
] + get_core_apps([
    'eupagoapps.basket',
    'eupagoapps.catalogue',
    'eupagoapps.promotions',
    'eupagoapps.offer',
    'eupagoapps.partner',
    'eupagoapps.order',
    'eupagoapps.dashboard',
    'eupagoapps.dashboard.catalogue',
    'eupagoapps.checkout',
    'eupagoapps.payment',
])

SITE_ID = 1

MIDDLEWARE_CLASSES = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
Esempio n. 3
0
    'ckeditor',
    'djcelery',
    'ckeditor_uploader',
    'captcha',
    'widget_tweaks',
    'rest_framework',
    'qrcode',
] + get_core_apps([
    'stars.apps.basket',
    'stars.apps.catalogue',
    'stars.apps.partner',
    'stars.apps.customer',
    'stars.apps.dashboard',
    'stars.apps.promotions',
    'stars.apps.dashboard.ad',
    'stars.apps.dashboard.catalogue',
    'stars.apps.dashboard.partners',
    'stars.apps.dashboard.permission',
    'stars.apps.dashboard.pickup_admin',
    'stars.apps.dashboard.business',
    'stars.apps.dashboard.dataquery',
    'stars.apps.address',
    'stars.apps.wishlists',
])
INSTALLED_APPS += [
    'stars',
    'stars.apps.accounts',
    'stars.apps.ad',
    'stars.apps.public',
    'stars.apps.commission',
    'stars.apps.customer.safety',
Esempio n. 4
0
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    # External apps
    'django_extensions',
    'debug_toolbar',
    # Apps from oscar
    'paypal',
    'compressor'
]

from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps([
    'apps.shipping',
    'apps.checkout'])

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.Emailbackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/accounts/'
APPEND_SLASH = True

DEBUG_TOOLBAR_CONFIG = {
    'INTERCEPT_REDIRECTS': False
}

# Oscar settings
def pytest_configure():
    from oscar.defaults import OSCAR_SETTINGS
    from oscar_mws.defaults import OSCAR_MWS_SETTINGS

    DEFAULT_SETTINGS = OSCAR_SETTINGS
    DEFAULT_SETTINGS.update(OSCAR_MWS_SETTINGS)
    DEFAULT_SETTINGS['OSCAR_DEFAULT_CURRENCY'] = 'USD'

    settings.configure(
        DATABASES={
            'default': {
                'ENGINE': 'django.db.backends.sqlite3',
                'NAME': ':memory:',
            }
        },
        USE_TZ=True,
        MEDIA_ROOT=sandbox('public/media'),
        MEDIA_URL='/media/',
        STATIC_URL='/static/',
        STATICFILES_DIRS=[
            sandbox('static/')
        ],
        STATIC_ROOT=sandbox('public'),
        STATICFILES_FINDERS=(
            'django.contrib.staticfiles.finders.FileSystemFinder',
            'django.contrib.staticfiles.finders.AppDirectoriesFinder',
            'compressor.finders.CompressorFinder',
        ),
        TEMPLATE_LOADERS=(
            'django.template.loaders.filesystem.Loader',
            'django.template.loaders.app_directories.Loader',
        ),
        TEMPLATE_CONTEXT_PROCESSORS = (
            "django.contrib.auth.context_processors.auth",
            "django.core.context_processors.request",
            "django.core.context_processors.debug",
            "django.core.context_processors.i18n",
            "django.core.context_processors.media",
            "django.core.context_processors.static",
            "django.contrib.messages.context_processors.messages",
        ),
        MIDDLEWARE_CLASSES=(
            'django.middleware.common.CommonMiddleware',
            'django.contrib.sessions.middleware.SessionMiddleware',
            'django.middleware.csrf.CsrfViewMiddleware',
            'django.contrib.auth.middleware.AuthenticationMiddleware',
            'django.contrib.messages.middleware.MessageMiddleware',
            'oscar.apps.basket.middleware.BasketMiddleware',
        ),
        ROOT_URLCONF='sandbox.sandbox.urls',
        TEMPLATE_DIRS=[
            sandbox('templates'),
            OSCAR_MAIN_TEMPLATE_DIR,
        ],
        INSTALLED_APPS=[
            'django.contrib.auth',
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'django.contrib.sites',
            'django.contrib.messages',
            'django.contrib.staticfiles',
            'django.contrib.admin',

            'compressor',
            'south',

            'oscar_mws',
        ] + get_core_apps(),
        AUTHENTICATION_BACKENDS=(
            'django.contrib.auth.backends.ModelBackend',
        ),
        COMPRESS_ENABLED=True,
        COMPRESS_OFFLINE=False,
        COMPRESS_PRECOMPILERS=(
            ('text/less', 'lessc {infile} {outfile}'),
        ),
        LOGIN_REDIRECT_URL='/accounts/',
        APPEND_SLASH=True,
        SITE_ID=1,
        HAYSTACK_CONNECTIONS={
            'default': {
                'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
            },
        },
        LOGGING={
            'version': 1,
            'disable_existing_loggers': True,
            'formatters': {
                'verbose': {
                    'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
                },
                'simple': {
                    'format': '%(levelname)s %(message)s'
                },
            },
            'filters': {
                'require_debug_false': {
                    '()': 'django.utils.log.RequireDebugFalse'
                }
            },
            'handlers': {
                'console': {
                    'level': 'DEBUG',
                    'class': 'logging.StreamHandler',
                    'formatter': 'simple',
                }
            },
            'loggers': {
                'oscar_mws': {
                    'handlers': ['console'],
                    'level': 'DEBUG',
                    'propagate': True,
                },
                'oscar_mws.api': {
                    'handlers': ['console'],
                    'level': 'DEBUG',
                    'propagate': True,
                },
                'django.request': {
                    'handlers': ['console'],
                    'level': 'DEBUG',
                    'propagate': True,
                },
            }
        },
        DEBUG=True,
        **DEFAULT_SETTINGS
    )
Esempio n. 6
0
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs',
    'south',
    'compressor',
    'smart_selects',
    'ajaximage',
    'django_iban',
    'piezas.apps.customuser',
    'piezas.apps.dashboard.podcatalogue', 'piezas.apps.dashboard.podorders',
    'piezas.apps.dashboard.podusers', 'piezas.apps.dashboard'
]
INSTALLED_APPS = INSTALLED_APPS + get_core_apps([
    'piezas.apps.customer', 
    'piezas.apps.catalogue',
    'piezas.apps.order',
    'piezas.apps.search',
    'piezas.apps.address'
])

SITE_ID = 1

SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'

# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
    'version': 1,
Esempio n. 7
0
OSCAR_HOMEPAGE = reverse_lazy('dashboard:index')
# END URL CONFIGURATION


# APP CONFIGURATION
OSCAR_APPS = [
    'ecommerce.extensions.api',
    'ecommerce.extensions.fulfillment',
    'ecommerce.extensions.refund',
] + get_core_apps([
    'ecommerce.extensions.analytics',
    'ecommerce.extensions.basket',
    'ecommerce.extensions.catalogue',
    'ecommerce.extensions.checkout',
    'ecommerce.extensions.dashboard',
    'ecommerce.extensions.dashboard.orders',
    'ecommerce.extensions.dashboard.users',
    'ecommerce.extensions.offer',
    'ecommerce.extensions.order',
    'ecommerce.extensions.partner',
    'ecommerce.extensions.payment',
    'ecommerce.extensions.voucher',
])
# END APP CONFIGURATION


# ORDER PROCESSING

# The initial status for an order, or an order line.
OSCAR_INITIAL_ORDER_STATUS = ORDER.OPEN
OSCAR_INITIAL_LINE_STATUS = LINE.OPEN
Esempio n. 8
0
 def test_uses_non_dashboard_override_when_specified(self):
     apps = oscar.get_core_apps(overrides=['apps.shipping'])
     self.assertTrue('apps.shipping' in apps)
     self.assertTrue('oscar.apps.shipping' not in apps)
Esempio n. 9
0
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'django.contrib.flatpages',
]

INSTALLED_APPS = THIRD_PARTY_APPS + DJANGO_APPS + SYSTEM_APPS \
    + get_core_apps([
        'marine_parts.apps.basket',
        'marine_parts.apps.catalogue',
        'marine_parts.apps.checkout',
        'marine_parts.apps.customer',
        'marine_parts.apps.dashboard',
        'marine_parts.apps.dashboard.catalogue',
        'marine_parts.apps.promotions',
        'marine_parts.apps.search',
        'marine_parts.apps.shipping',
    ])

AUTH_USER_MODEL = 'users.User'
"""
Oscar shop settings
"""
OSCAR_SHOP_NAME = 'Marine Parts'

# Order processing
OSCAR_INITIAL_ORDER_STATUS = 'Pending'
OSCAR_INITIAL_LINE_STATUS = 'Pending'
def pytest_configure():
    SETTINGS = OSCAR_SETTINGS
    SETTINGS.update(FANCYPAGES_SETTINGS)

    settings.configure(
        DEBUG=True,
        DATABASES={
            'default': {
                'ENGINE': 'django.db.backends.sqlite3',
                'NAME': ':memory:',
            }
        },
        MEDIA_ROOT=sandbox('public/media'),
        MEDIA_URL='/media/',
        STATIC_URL='/static/',
        STATICFILES_DIRS=[sandbox('static/')] +
        ofp_utils.get_oscar_fancypages_paths('static'),
        STATIC_ROOT=sandbox('public'),
        STATICFILES_FINDERS=(
            'django.contrib.staticfiles.finders.FileSystemFinder',
            'django.contrib.staticfiles.finders.AppDirectoriesFinder',
            'compressor.finders.CompressorFinder',
        ),
        TEMPLATE_LOADERS=(
            'django.template.loaders.filesystem.Loader',
            'django.template.loaders.app_directories.Loader',
        ),
        TEMPLATE_CONTEXT_PROCESSORS=(
            "django.contrib.auth.context_processors.auth",
            "django.core.context_processors.request",
            "django.core.context_processors.debug",
            "django.core.context_processors.i18n",
            "django.core.context_processors.media",
            "django.core.context_processors.static",
            "django.contrib.messages.context_processors.messages",
        ),
        MIDDLEWARE_CLASSES=(
            'django.middleware.common.CommonMiddleware',
            'django.contrib.sessions.middleware.SessionMiddleware',
            'django.middleware.csrf.CsrfViewMiddleware',
            'django.contrib.auth.middleware.AuthenticationMiddleware',
            'django.contrib.messages.middleware.MessageMiddleware',
            'fancypages.middleware.EditorMiddleware',
        ),
        ROOT_URLCONF='oscar_sandbox.sandbox.urls',
        TEMPLATE_DIRS=[
            sandbox('templates'),
            OSCAR_MAIN_TEMPLATE_DIR,
        ] + ofp_utils.get_oscar_fancypages_paths('templates'),
        INSTALLED_APPS=[
            'django.contrib.auth',
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'django.contrib.sites',
            'django.contrib.messages',
            'django.contrib.staticfiles',
            'django.contrib.admin',
            'model_utils',
            'compressor',
            'twitter_tag',
            'sorl.thumbnail',
            'rest_framework',
            'django_extensions',
        ] + ofp_utils.get_oscar_fancypages_apps() + get_core_apps(),
        AUTHENTICATION_BACKENDS=(
            'django.contrib.auth.backends.ModelBackend', ),
        HAYSTACK_CONNECTIONS={
            'default': {
                'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
            },
        },
        LOGIN_REDIRECT_URL='/accounts/',
        APPEND_SLASH=True,
        SITE_ID=1,
        **SETTINGS)
Esempio n. 11
0
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'django.contrib.sitemaps',
    'django_extensions',
    'widget_tweaks',
    'crispy_forms',
    'debug_toolbar',
]
INSTALLED_APPS = INSTALLED_APPS + get_core_apps([
    'myapps.catalogue',
    'myapps.partner',
    'myapps.basket',
])
SITE_ID = 1
AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
        'URL': 'http://127.0.0.1:8983/solr',
        'INCLUDE_SPELLING': True,
    },
}
Esempio n. 12
0
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    # External apps
    'django_extensions',
    'debug_toolbar',
    # Apps from oscar
    'paypal',
    'widget_tweaks',
]

from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps([
    'apps.shipping',
    'apps.checkout'])

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.Emailbackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/accounts/'
APPEND_SLASH = True

# Oscar settings
from oscar.defaults import *
OSCAR_ALLOW_ANON_CHECKOUT = True

OSCAR_SHOP_TAGLINE = 'PayPal'
Esempio n. 13
0
def pytest_configure():
    location = lambda x: os.path.join(
        os.path.dirname(os.path.realpath(__file__)), x)

    test_settings = OSCAR_SETTINGS.copy()
    test_settings.update(
        dict(
            DATABASES={
                'default': {
                    'ENGINE': 'django.contrib.gis.db.backends.postgis',
                    'NAME': 'oscar_stores',
                }
            },
            SITE_ID=1,
            MEDIA_ROOT=location('public/media'),
            MEDIA_URL='/media/',
            STATIC_URL='/static/',
            STATICFILES_DIRS=(location('static/'), ),
            STATIC_ROOT=location('public'),
            STATICFILES_FINDERS=(
                'django.contrib.staticfiles.finders.FileSystemFinder',
                'django.contrib.staticfiles.finders.AppDirectoriesFinder',
            ),
            TEMPLATES=[{
                'BACKEND':
                'django.template.backends.django.DjangoTemplates',
                'DIRS': [
                    location('templates'),
                    OSCAR_MAIN_TEMPLATE_DIR,
                ],
                'OPTIONS': {
                    'loaders': [
                        'django.template.loaders.filesystem.Loader',
                        'django.template.loaders.app_directories.Loader',
                    ],
                    'context_processors': [
                        'django.contrib.auth.context_processors.auth',
                        'django.template.context_processors.request',
                        'django.template.context_processors.debug',
                        'django.template.context_processors.i18n',
                        'django.template.context_processors.media',
                        'django.template.context_processors.static',
                        'django.contrib.messages.context_processors.messages',
                    ],
                }
            }],
            MIDDLEWARE_CLASSES=(
                'django.middleware.common.CommonMiddleware',
                'django.contrib.sessions.middleware.SessionMiddleware',
                'django.middleware.csrf.CsrfViewMiddleware',
                'django.contrib.auth.middleware.AuthenticationMiddleware',
                'django.contrib.messages.middleware.MessageMiddleware',
                'oscar.apps.basket.middleware.BasketMiddleware',
            ),
            ROOT_URLCONF='sandbox.sandbox.urls',
            TEMPLATE_DIRS=(
                location('templates'),
                OSCAR_MAIN_TEMPLATE_DIR,
            ),
            INSTALLED_APPS=[
                'django.contrib.auth',
                'django.contrib.contenttypes',
                'django.contrib.sessions',
                'django.contrib.sites',
                'django.contrib.messages',
                'django.contrib.staticfiles',
                'django.contrib.admin',
                'django.contrib.gis',
                'django.contrib.flatpages',
                'widget_tweaks',
            ] + get_core_apps() + [
                'stores',
            ],
            AUTHENTICATION_BACKENDS=(
                'oscar.apps.customer.auth_backends.EmailBackend',
                'django.contrib.auth.backends.ModelBackend',
            ),
            LOGIN_REDIRECT_URL='/accounts/',
            APPEND_SLASH=True,
            HAYSTACK_CONNECTIONS={
                'default': {
                    'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
                },
            },
            GEOIP_PATH='sandbox/geoip',
            COMPRESS_ENABLED=False,
            TEST_RUNNER='django.test.runner.DiscoverRunner',
        ))

    settings.configure(**test_settings)
Esempio n. 14
0
    'wagtail.wagtailsites',
    'wagtail.wagtailusers',
    'wagtail.wagtailsnippets',
    'wagtail.wagtaildocs',
    'wagtail.wagtailimages',
    'wagtail.wagtailsearch',
    'wagtail.wagtailadmin',
    'wagtail.wagtailcore',
    'taggit',
    'modelcluster',
    'oscar_wagtail',  # Thats us!

    # Use a custom partner app to test overriding models.  I can't
    # find a way of doing this on a per-test basis, so I'm using a
    # global change.
] + oscar.get_core_apps(['tests.project.apps.catalogue'])

TEMPLATES = [{
    'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [
        oscar.OSCAR_MAIN_TEMPLATE_DIR,
    ],
    'OPTIONS': {
        'loaders': [
            ('django.template.loaders.cached.Loader', [
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
                'django.template.loaders.eggs.Loader'
            ]),
        ],
        'context_processors': [
Esempio n. 15
0
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'widget_tweaks',
    #'yourappsfolder.catalogue.config.CatalogueConfig'
    #'django.apps',
    #'yourappsfolder.order.apps.OrderConfig',
    #'yourappsfolder.order'
] + get_core_apps(['yourappsfolder.catalogue'])

SITE_ID = 1

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
]
Esempio n. 16
0
    'django.contrib.staticfiles',
    # Apps from oscar
    'rzpay',
    'compressor',
    'widget_tweaks',
    # Vendor apps
    'bootstrap4',
    'contact',
    'demo',
]

DJANGO_TABLES2_TEMPLATE = 'django_tables2/bootstrap-responsive.html'

TREE_TYPES = (('Marketing.LevelTree', 'LevelTree'), )

INSTALLED_APPS = INSTALLED_APPS + get_core_apps(['apps.shipping'])

DEFAULT_FROM_EMAIL = '*****@*****.**'

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME':
        'django.contrib.auth.password_validation.MinimumLengthValidator',
        'OPTIONS': {
            'min_length': 9,
        }
Esempio n. 17
0
    'datacash',
    # External apps
    'django_extensions',
    'debug_toolbar',
    # For profile testing
    'apps.user',
    'apps.bigbang',
    # Sentry (for live demo site)
    'raven.contrib.django.raven_compat'
]

# Include core apps with a few overrides:
# - a shipping override app to provide some shipping methods
# - an order app to provide order processing logic
from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps(
    ['apps.shipping', 'apps.order', 'apps.catalogue'])

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.Emailbackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/'
APPEND_SLASH = True

# Haystack settings - we use a local Solr instance running on the default port
HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
        'URL': 'http://127.0.0.1:8983/solr',
    },
Esempio n. 18
0
from base import *

ALLOWED_HOSTS = ['63.142.254.51', 'localhost']

PAYPAL_API_USERNAME = '******'
PAYPAL_API_PASSWORD = '******'
PAYPAL_API_SIGNATURE = 'AFcWxV21C7fd0v3bYYYRCpSSRl31AcHV4KiPTORgwMrl98rYKXeUCnfC'

OSCAR_SHOP_NAME = 'IndianGrocery.us'
OSCAR_SHOP_TAGLINE = 'Shopping, simplified.'

from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps([
    'indiangro.promotions',
    'indiangro.partner',
])
Esempio n. 19
0
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'social_django',
    'django_extensions',
    'reversion',
    'widget_tweaks',
    'django_countries',
    'django_cron',
    ] + get_core_apps([  # django-oscar overrides
        'ledger.basket',
        'ledger.order',
        'ledger.checkout',
        'ledger.address',
        'ledger.catalogue',
        'ledger.dashboard.catalogue',
        'ledger.payment'
    ]) + [
    'ledger.accounts',   #  Defines custom user model, passwordless auth pipeline.
    'ledger.licence',
    'ledger.payments',
    'ledger.payments.bpay',
    'ledger.payments.bpoint',
    'ledger.payments.cash',
    'ledger.payments.invoice',
    'ledger.taxonomy',
]

MIDDLEWARE_CLASSES = [
Esempio n. 20
0
 def test_returns_core_apps_when_no_overrides_specified(self):
     apps = oscar.get_core_apps()
     self.assertEqual(oscar.OSCAR_CORE_APPS, apps)
Esempio n. 21
0
def configure():
    if not settings.configured:
        from oscar.defaults import OSCAR_SETTINGS

        # Helper function to extract absolute path
        location = lambda x: os.path.join(
            os.path.dirname(os.path.realpath(__file__)), x)

        test_settings = {
            'DATABASES': {
                'default': {
                    'ENGINE': 'django.db.backends.sqlite3',
                    'NAME': ':memory:',
                },
            },
            'INSTALLED_APPS': [
                'django.contrib.auth',
                'django.contrib.admin',
                'django.contrib.contenttypes',
                'django.contrib.sessions',
                'django.contrib.sites',
                'django.contrib.flatpages',
                'django.contrib.staticfiles',
                'sorl.thumbnail',
                'compressor',
                # Use a custom partner app to test overriding models.  I can't
                # find a way of doing this on a per-test basis, so I'm using a
                # global change.
            ] + oscar.get_core_apps(['tests._site.apps.partner']),
            'TEMPLATE_CONTEXT_PROCESSORS': (
                "django.contrib.auth.context_processors.auth",
                "django.core.context_processors.request",
                "django.core.context_processors.debug",
                "django.core.context_processors.i18n",
                "django.core.context_processors.media",
                "django.core.context_processors.static",
                "django.contrib.messages.context_processors.messages",
                'oscar.apps.search.context_processors.search_form',
                'oscar.apps.customer.notifications.context_processors.notifications',
                'oscar.apps.promotions.context_processors.promotions',
                'oscar.apps.checkout.context_processors.checkout',
                'oscar.core.context_processors.metadata',
            ),
            'TEMPLATE_DIRS': (
                location('templates'),
                oscar.OSCAR_MAIN_TEMPLATE_DIR,
            ),
            'MIDDLEWARE_CLASSES': global_settings.MIDDLEWARE_CLASSES + (
                'oscar.apps.basket.middleware.BasketMiddleware',
            ),
            'AUTHENTICATION_BACKENDS': (
                'oscar.apps.customer.auth_backends.Emailbackend',
                'django.contrib.auth.backends.ModelBackend',
            ),
            'HAYSTACK_CONNECTIONS': {
                'default': {
                    'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
                }
            },
            'PASSWORD_HASHERS': ['django.contrib.auth.hashers.MD5PasswordHasher'],
            'ROOT_URLCONF': 'tests._site.urls',
            'LOGIN_REDIRECT_URL': '/accounts/',
            'STATIC_URL': '/static/',
            'COMPRESS_ENABLED': False,
            'COMPRESS_ROOT': '',  # needed to avoid issue #1214
            'ADMINS': ('*****@*****.**',),
            'DEBUG': False,
            'SITE_ID': 1,
            'APPEND_SLASH': True,
            'DDF_DEFAULT_DATA_FIXTURE': 'tests.dynamic_fixtures.OscarDynamicDataFixtureClass',
            'SESSION_SERIALIZER': 'django.contrib.sessions.serializers.JSONSerializer',
        }
        if django.VERSION >= (1, 5):
            test_settings['INSTALLED_APPS'] += ['tests._site.myauth', ]
            test_settings['AUTH_USER_MODEL'] = 'myauth.User'
        test_settings.update(OSCAR_SETTINGS)

        settings.configure(**test_settings)
Esempio n. 22
0
 def test_uses_non_dashboard_override_when_specified(self):
     apps = oscar.get_core_apps(overrides=['apps.shipping'])
     self.assertTrue('apps.shipping' in apps)
     self.assertTrue('oscar.apps.shipping' not in apps)
Esempio n. 23
0
    'Being processed': ('Processed', 'Cancelled',),
    'Cancelled': (),
}

OSCAR_DEFAULT_CURRENCY = "ILS"

# paypal
from django.utils.translation import ugettext_lazy as _
OSCAR_DASHBOARD_NAVIGATION.append({
    'label': _('PayPal'),
    'icon': 'icon-globe',
    'children': [
        {
            'label': _('Express transactions'),
            'url_name': 'paypal-express-list',
        },
    ]
})

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

########################
# 3.variants and dates #
########################

INSTALLED_APPS += [
    'oscardemo',
] + get_core_apps([
    'oscardemo.promotions'
])
Esempio n. 24
0
 def test_uses_dashboard_override_when_specified(self):
     apps = oscar.get_core_apps(overrides=['apps.dashboard.catalogue'])
     self.assertTrue('apps.dashboard.catalogue' in apps)
     self.assertTrue('oscar.apps.dashboard.catalogue' not in apps)
     self.assertTrue('oscar.apps.catalogue' in apps)
Esempio n. 25
0
 def test_app_list_can_be_accessed_with_overrides(self):
     apps = oscar.get_core_apps(overrides=['apps.shipping'])
     self.assertTrue('apps.shipping' in apps)
     self.assertTrue('oscar.apps.shipping' not in apps)
Esempio n. 26
0
# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.sites',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'compressor',
    'widget_tweaks',
] + get_core_apps([
    'myapps.promotions', 'myapps.dashboard', 'myapps.dashboard.reports',
    'myapps.analytics'
])
# ['myapps.promotions']
SITE_ID = 1
MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
]
AUTHENTICATION_BACKENDS = (
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.admin',

    'compressor',
    'south',
    'django_extensions',
]

THIRD_PARTY_APPS = [
    'debug_toolbar',
]

from oscar import get_core_apps
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + ['oscar_mws'] + get_core_apps()

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.Emailbackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/accounts/'
APPEND_SLASH = True

DEBUG_TOOLBAR_CONFIG = {
    'INTERCEPT_REDIRECTS': False
}

# Oscar settings
from oscar.defaults import *
Esempio n. 28
0
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
    }
}
INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.admin',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'paypal',
    'widget_tweaks',
] + get_core_apps([
    'tests.shipping',
])

MIDDLEWARE = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
)

DEBUG = False
HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
Esempio n. 29
0
OSCAR_SHOP_NAME = 'King Of Gym'
OSCAR_SHOP_TAGLINE = 'Get hench stay hench'

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'django.contrib.sites',
    'django.contrib.flatpages',
    'compressor',
    'widget_tweaks',
] + get_core_apps()

SITE_ID = 1

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',

    'oscar.apps.basket.middleware.BasketMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
Esempio n. 30
0
    'django_extensions',
    'djangosecure',
    # Debug toolbar + extensions
    #'livereload',
    'storages',
    'fontawesome',
    'debug_toolbar',
    'apps.gateway',
    # For allowing dashboard access
    'widget_tweaks',
] + oscar.get_core_apps([
    'apps.future',
    'apps.basket',
    'apps.catalogue',
    'apps.checkout',
    'apps.order',
    'apps.partner',
    'apps.shipping',
    'apps.dashboard.communications',
    'apps.dashboard.orders',
    'apps.promotions',
])

# AUTH_USER_MODEL = "user.UseExtendedUserModelr"

# Add Oscar's custom auth backend so users can sign in using their email
# address.
AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)
Esempio n. 31
0
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'widget_tweaks',
    'rest_framework',
    'oscarbluelight',
] + get_core_apps([
    'oscarbluelight.dashboard.offers',
    'oscarbluelight.dashboard.vouchers',
    'oscarbluelight.offer',
    'oscarbluelight.voucher',
    'sandbox.basket',
    'sandbox.partner',
])

MIDDLEWARE = (
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
)
Esempio n. 32
0
from oscar import get_core_apps

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.sites',
    'compressor',
    'widget_tweaks',
    'django.contrib.sitemaps',
    'social.apps.django_app.default',
] + get_core_apps(['myapps.catalogue', 'myapps.order'])

SITE_ID = 1

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
}


INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',

    # External apps
    'widget_tweaks',
] + get_core_apps(['apps.shipping']) + ['oscar_accounts']

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/accounts/'
APPEND_SLASH = True


OSCAR_SHOP_TAGLINE = "Accounts"

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
Esempio n. 34
0
# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.sites',
    'widget_tweaks',
] + get_core_apps([
    'packjoy.apps.shipping',
    'packjoy.apps.checkout',
    'packjoy.apps.partner',
    'packjoy.apps.dashboard',
])

SITE_ID = 1

MIDDLEWARE_CLASSES = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
Esempio n. 35
0
 def test_returns_core_apps_when_no_overrides_specified(self):
     apps = oscar.get_core_apps()
     self.assertEqual(oscar.OSCAR_CORE_APPS, apps)
Esempio n. 36
0
    'django.contrib.admin',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'widget_tweaks',

    # contains models we need for testing
    'tests._site.model_tests_app',
    'tests._site.myauth',

    # Use a custom partner app to test overriding models.  I can't
    # find a way of doing this on a per-test basis, so I'm using a
    # global change.
] + oscar.get_core_apps(
    ['tests._site.apps.partner', 'tests._site.apps.customer'])

AUTH_USER_MODEL = 'myauth.User'

TEMPLATES = [{
    'BACKEND':
    'django.template.backends.django.DjangoTemplates',
    'DIRS': [
        location('_site/templates'),
        oscar.OSCAR_MAIN_TEMPLATE_DIR,
    ],
    'OPTIONS': {
        'loaders': [
            ('django.template.loaders.cached.Loader', [
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
Esempio n. 37
0
 def test_uses_dashboard_override_when_specified(self):
     apps = oscar.get_core_apps(overrides=['apps.dashboard.catalogue'])
     self.assertTrue('apps.dashboard.catalogue' in apps)
     self.assertTrue('oscar.apps.dashboard.catalogue' not in apps)
     self.assertTrue('oscar.apps.catalogue' in apps)
Esempio n. 38
0
    'wagtail.wagtailsites',
    'wagtail.wagtailusers',
    'wagtail.wagtailsnippets',
    'wagtail.wagtaildocs',
    'wagtail.wagtailimages',
    'wagtail.wagtailsearch',
    'wagtail.wagtailadmin',
    'wagtail.wagtailcore',

    'rest_framework',
    'modelcluster',
    'taggit',
    'widget_tweaks',
] + get_core_apps([
    'uwkmdemo.apps.partner',
    'uwkmdemo.apps.shipping',
    'uwkmdemo.apps.order'
])

SITE_ID = 1

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'wagtail.wagtailcore.middleware.SiteMiddleware',
Esempio n. 39
0
def configure():
    if not settings.configured:
        from oscar.defaults import OSCAR_SETTINGS

        # Helper function to extract absolute path
        location = lambda x: os.path.join(
            os.path.dirname(os.path.realpath(__file__)), x)

        test_settings = OSCAR_SETTINGS.copy()
        test_settings.update({
            'DATABASES': {
                'default': {
                    'ENGINE': 'django.db.backends.sqlite3',
                    'NAME': ':memory:',
                },
            },
            'INSTALLED_APPS': [
                'django.contrib.auth',
                'django.contrib.admin',
                'django.contrib.contenttypes',
                'django.contrib.sessions',
                'django.contrib.sites',
                'django.contrib.flatpages',
                'django.contrib.staticfiles',
                'compressor',
                'tests._site.model_tests_app',  # contains models we need for testing
                'tests._site.myauth',

                # Use a custom partner app to test overriding models.  I can't
                # find a way of doing this on a per-test basis, so I'm using a
                # global change.
            ] + oscar.get_core_apps([
                'tests._site.apps.partner',
                'tests._site.apps.customer']),
            'AUTH_USER_MODEL': 'myauth.User',
            'TEMPLATE_CONTEXT_PROCESSORS': (
                "django.contrib.auth.context_processors.auth",
                "django.core.context_processors.request",
                "django.core.context_processors.debug",
                "django.core.context_processors.i18n",
                "django.core.context_processors.media",
                "django.core.context_processors.static",
                "django.contrib.messages.context_processors.messages",
                'oscar.apps.search.context_processors.search_form',
                'oscar.apps.customer.notifications.context_processors.notifications',
                'oscar.apps.promotions.context_processors.promotions',
                'oscar.apps.checkout.context_processors.checkout',
                'oscar.core.context_processors.metadata',
            ),
            'TEMPLATE_DIRS': (
                location('templates'),
                oscar.OSCAR_MAIN_TEMPLATE_DIR,
            ),
            'TEMPLATE_LOADERS': (('django.template.loaders.cached.Loader',
                                     global_settings.TEMPLATE_LOADERS),),
            'MIDDLEWARE_CLASSES': (
                'django.middleware.common.CommonMiddleware',
                'django.contrib.sessions.middleware.SessionMiddleware',
                'django.middleware.csrf.CsrfViewMiddleware',
                'django.contrib.auth.middleware.AuthenticationMiddleware',
                'django.contrib.messages.middleware.MessageMiddleware',
                'oscar.apps.basket.middleware.BasketMiddleware',
            ),
            'AUTHENTICATION_BACKENDS': (
                'oscar.apps.customer.auth_backends.EmailBackend',
                'django.contrib.auth.backends.ModelBackend',
            ),
            'HAYSTACK_CONNECTIONS': {
                'default': {
                    'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
                }
            },
            'PASSWORD_HASHERS': ['django.contrib.auth.hashers.MD5PasswordHasher'],
            'ROOT_URLCONF': 'tests._site.urls',
            'LOGIN_REDIRECT_URL': '/accounts/',
            'STATIC_URL': '/static/',
            'COMPRESS_ENABLED': False,
            'COMPRESS_ROOT': '',  # needed to avoid issue #1214
            'DEBUG': False,
            'SITE_ID': 1,
            'USE_TZ': 1,
            'APPEND_SLASH': True,
            'DDF_DEFAULT_DATA_FIXTURE': 'tests.dynamic_fixtures.OscarDynamicDataFixtureClass',
            'SESSION_SERIALIZER': 'django.contrib.sessions.serializers.JSONSerializer',

            # temporary workaround for issue in sorl-thumbnail in Python 3
            # https://github.com/mariocesar/sorl-thumbnail/pull/254
            'THUMBNAIL_DEBUG': False,

            'OSCAR_INITIAL_ORDER_STATUS': 'A',
            'OSCAR_ORDER_STATUS_PIPELINE': {'A': ('B',), 'B': ()},
            'OSCAR_INITIAL_LINE_STATUS': 'a',
            'OSCAR_LINE_STATUS_PIPELINE': {'a': ('b', ), 'b': ()},

            # Setting this explicitly prevents Django 1.7+ from showing a
            # warning regarding a changed default test runner. The Oscar test
            # suite is run with nose anyway, so the value does not matter.
            'TEST_RUNNER': 'foobar',
        })

        settings.configure(**test_settings)
    }
}

INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',

    # External apps
    'widget_tweaks',
] + get_core_apps(['apps.shipping']) + ['oscar_accounts']

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/accounts/'
APPEND_SLASH = True

OSCAR_SHOP_TAGLINE = "Accounts"

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
    },
Esempio n. 41
0
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.sitemaps',
    'compressor',
    'widget_tweaks',
    'debug_toolbar',
    'template_timings_panel',
    'smart_load_tag',
    'django_summernote',
    'ternovoshop.apps.blog',
    'ternovoshop.templatetags',
    'disqus',
    ] + get_core_apps(['ternovoshop.apps.promotions','ternovoshop.apps.dashboard.blog','ternovoshop.apps.dashboard.importexport','ternovoshop.apps.address','ternovoshop.apps.checkout','ternovoshop.apps.catalogue','ternovoshop.apps.catalogue.reviews','ternovoshop.apps.offer','ternovoshop.apps.shipping','ternovoshop.apps.dashboard', 'ternovoshop.apps.dashboard.catalogue'])


MIDDLEWARE_CLASSES = (
    'debug_toolbar.middleware.DebugToolbarMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
Esempio n. 42
0
    # 대은 페북 로그
    'social.apps.django_app.default',
    # 'paypal',
    'currency',
    'storages',
    'custom_categories',
    # 'temp_paypal',
] + get_core_apps([
    'apps.address',
    'apps.analytics',
    'apps.basket',
    'apps.catalogue',
    'apps.checkout',
    'apps.customer',
    'apps.dashboard',
    'apps.offer',
    'apps.order',
    'apps.partner',
    'apps.payment',
    # 'apps.promotions',
    'apps.shipping',
    'apps.voucher',
    'apps.wishlists',
    'apps.dashboard.catalogue',
])

SITE_ID = 1

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    # 대은 번역 추가
    'django.middleware.locale.LocaleMiddleware',
Esempio n. 43
0
    'django.contrib.admin',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'widget_tweaks',

    # contains models we need for testing
    'tests._site.model_tests_app',
    'tests._site.myauth',

    # Use a custom partner app to test overriding models.  I can't
    # find a way of doing this on a per-test basis, so I'm using a
    # global change.
] + oscar.get_core_apps(['tests._site.apps.partner', 'tests._site.apps.customer'])

AUTH_USER_MODEL = 'myauth.User'
TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.core.context_processors.request",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    "django.core.context_processors.static",
    "django.contrib.messages.context_processors.messages",
    'oscar.apps.search.context_processors.search_form',
    'oscar.apps.customer.notifications.context_processors.notifications',
    'oscar.apps.promotions.context_processors.promotions',
    'oscar.apps.checkout.context_processors.checkout',
    'oscar.core.context_processors.metadata',
Esempio n. 44
0
    'django.contrib.messages',
    # 'modeltranslation',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'django.contrib.sitemaps',
    'django_extensions',
    'paypal',
    'dbbackup',  # django-dbbackup

    # Debug toolbar + extensions
    'debug_toolbar',
    'apps.gateway',  # For allowing dashboard access
    'apps.homepage',
    'widget_tweaks',
] + oscar.get_core_apps(
    ['apps.checkout', 'apps.order', 'apps.shipping', 'apps.partner'])

# Add Oscar's custom auth backend so users can sign in using their email
# address.
AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/'
APPEND_SLASH = False

# ====================
# Messages contrib app
# ====================
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'compressor',
    'widget_tweaks',
] + get_core_apps([
    'oscar_vat_moss.address',
    'oscar_vat_moss.catalogue',
    'oscar_vat_moss.checkout',
    'oscar_vat_moss.dashboard.catalogue',
    'oscar_vat_moss.partner',
    'oscar_vat_moss.order',
])


MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
Esempio n. 46
0
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'django.contrib.sitemaps',
    'django_extensions',

    # Debug toolbar + extensions
    'debug_toolbar',
    'apps.gateway',  # For allowing dashboard access
    'widget_tweaks',
] + oscar.get_core_apps()

# Add Oscar's custom auth backend so users can sign in using their email
# address.
AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/'
APPEND_SLASH = True

# ====================
# Messages contrib app
# ====================
Esempio n. 47
0
    'oscar_accounts',
    'oscarapicheckout',
    'oauth2_provider',
    'whoosh',
    'xapian_backend',
    'widget_tweaks',
 #   'custom.users',
 #   'custom.metaprop',
 #   'custom.cases',
 #   'custom.signup',
 #   'custom.utils',
 #   'custom.services',
 #   'custom.chat',
 #   'custom.tasks',
 #   'custom.gui',
]+get_core_apps([])

# Needed by oscarapicheckout
ORDER_STATUS_PENDING = 'Pending'
ORDER_STATUS_PAYMENT_DECLINED = 'Payment Declined'
ORDER_STATUS_AUTHORIZED = 'Authorized'

# settings.py
PINAX_STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "your test public key")
PINAX_STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "your test secret key")
# Other statuses
ORDER_STATUS_SHIPPED = 'Shipped'
ORDER_STATUS_CANCELED = 'Canceled'

# Pipeline Config
Esempio n. 48
0
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    # External apps
    'django_extensions',
    'debug_toolbar',
    'oscar_stripe',
    'south',
]
from oscar import get_core_apps
INSTALLED_APPS += get_core_apps()

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.Emailbackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/accounts/'
APPEND_SLASH = True

DEBUG_TOOLBAR_CONFIG = {'INTERCEPT_REDIRECTS': False}

# Oscar settings
from oscar.defaults import *
OSCAR_ALLOW_ANON_CHECKOUT = True
Esempio n. 49
0
 def test_app_list_can_be_accessed_through_fn(self):
     core_apps = oscar.get_core_apps()
     self.assertTrue('oscar' in core_apps)
Esempio n. 50
0
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'django.contrib.sitemaps',
    'django_extensions',
    # Debug toolbar + extensions
    'debug_toolbar',
    'template_timings_panel',
    'compressor',  # Oscar's templates use compressor
    'apps.gateway',  # For allowing dashboard access
    'widget_tweaks',
]
from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps()

# As we use the sandbox to create both South migrations and native ones,
# the sandbox needs to work both with Django < 1.7 and 1.7
import django
if django.VERSION < (1, 7):
    INSTALLED_APPS.append('south')

# Add Oscar's custom auth backend so users can sign in using their email
# address.
AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/'
Esempio n. 51
0
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'django_extensions',
    # Debug toolbar + extensions
    'debug_toolbar',
    'cache_panel',
    #'template_timings_panel',
    'south',
    'rosetta',          # For i18n testing
    'compressor',
    'apps.gateway',     # For allowing dashboard access
]
from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps()

# Add Oscar's custom auth backend so users can sign in using their email
# address.
AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.Emailbackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/'
APPEND_SLASH = True

# Haystack settings
HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
Esempio n. 52
0
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'django.contrib.flatpages',
    'compressor',
    'widget_tweaks',
    'paypal',
    'storages',
    'boto3',
] + get_core_apps(['catalogue'])

SITE_ID = 1

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'whitenoise.middleware.WhiteNoiseMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
]
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, }
INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.admin',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'compressor',
    'widget_tweaks',
    'rest_framework',
    'telegrambot',
    'oscar_telegrambot',

] + oscar.get_core_apps()

# AUTH_USER_MODEL = 'myauth.User'
TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.core.context_processors.request",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    "django.core.context_processors.static",
    "django.contrib.messages.context_processors.messages",
    'oscar.apps.search.context_processors.search_form',
    'oscar.apps.customer.notifications.context_processors.notifications',
    'oscar.apps.promotions.context_processors.promotions',
    'oscar.apps.checkout.context_processors.checkout',
    'oscar.core.context_processors.metadata',
Esempio n. 54
0
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.gis',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'social_django',
    'django_extensions',
    'reversion',
    'widget_tweaks',
    'django_countries',
    'django_cron',
] + get_core_apps([  # django-oscar overrides
    'ledger.basket', 'ledger.order', 'ledger.checkout', 'ledger.address',
    'ledger.catalogue', 'ledger.dashboard.catalogue', 'ledger.payment'
]) + [
    'ledger.accounts',  #  Defines custom user model, passwordless auth pipeline.
    'ledger.licence',
    'ledger.payments',
    'ledger.payments.bpay',
    'ledger.payments.bpoint',
    'ledger.payments.cash',
    'ledger.payments.invoice',
    'ledger.taxonomy',
]

MIDDLEWARE_CLASSES = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
Esempio n. 55
0
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # Add for Oscar
    'django.contrib.sites',
    'django.contrib.flatpages',
    'compressor',
    # Add for custom user
    'usermod',
    # Add for Oscar customization
    'apps',
    'apps.dashboard.inventory',
    'pages',
    # Payment
    'paypal',
] + get_core_apps(['apps.catalogue', 'apps.dashboard.catalogue',
     'apps.shipping','apps.customer', 'apps.partner',
     'apps.dashboard', 'apps.dashboard.reports',])

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    # Add for Oscar
    'oscar.apps.basket.middleware.BasketMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)

AUTHENTICATION_BACKENDS = (
Esempio n. 56
0
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.sites',
    'django.contrib.flatpages',
    'compressor',
    'widget_tweaks',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.facebook',
    'allauth.socialaccount.providers.google',
    'petzoapp',
] + get_core_apps()

SITE_ID = 1

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'oscar.apps.basket.middleware.BasketMiddleware',
    'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
]
INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.flatpages',
    'django.contrib.staticfiles',
    'south', # Do not change the position of south in this list unless specificall instructed to by installation instructions
    'django_extensions',
    'debug_toolbar',
]

from oscar import get_core_apps
INSTALLED_APPS += get_core_apps()

# This is set as in a HTML comment at the bottom of the page
HOSTNAME = 'N/A'

# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOG_ROOT = location('../logs/')

SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
SESSION_COOKIE_HTTPONLY = True

AUTHENTICATION_BACKENDS = (
Esempio n. 58
0
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.flatpages',
    'django.contrib.sitemaps',
    'south',
    'compressor',
    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    'django.contrib.admindocs',
    'apps.invoice',
    'haystack',
    'robokassa',
] + get_core_apps(['apps.dashboard', 'apps.checkout', 'apps.catalogue', 'apps.shipping'])


#LOCALE
#=======

LOCALE_PATHS = (root( 'locale'),)

# ==============
# Oscar settings
# ==============

from oscar.defaults import *
from practica.oscar_settings import *
from practica.requisites import REQUISITES
from practica.robokassa_settings import *
    'south',
    # Oscar extensions
    'stores',
    'paypal',
    'datacash',
    # External apps
    'django_extensions',
    'debug_toolbar',
    # For profile testing
    'apps.user',
    'apps.bigbang',
]

# Include a shipping override app to provide some shipping methods
from oscar import get_core_apps
INSTALLED_APPS = INSTALLED_APPS + get_core_apps(['apps.shipping'])

AUTHENTICATION_BACKENDS = (
    'oscar.apps.customer.auth_backends.Emailbackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_REDIRECT_URL = '/accounts/'
APPEND_SLASH = True

# Haystack settings
HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
        'URL': 'http://127.0.0.1:8983/solr',
    },
Esempio n. 60
0
OSCAR_HOMEPAGE = reverse_lazy('dashboard:index')
# END URL CONFIGURATION

# APP CONFIGURATION
OSCAR_APPS = [
    'ecommerce.extensions.api',
    'ecommerce.extensions.fulfillment',
    'ecommerce.extensions.refund',
] + get_core_apps([
    'ecommerce.extensions.analytics',
    'ecommerce.extensions.basket',
    'ecommerce.extensions.catalogue',
    'ecommerce.extensions.checkout',
    'ecommerce.extensions.customer',
    'ecommerce.extensions.dashboard',
    'ecommerce.extensions.dashboard.orders',
    'ecommerce.extensions.dashboard.users',
    'ecommerce.extensions.offer',
    'ecommerce.extensions.order',
    'ecommerce.extensions.partner',
    'ecommerce.extensions.payment',
    'ecommerce.extensions.voucher',
])
# END APP CONFIGURATION

# ORDER PROCESSING

# The initial status for an order, or an order line.
OSCAR_INITIAL_ORDER_STATUS = ORDER.OPEN
OSCAR_INITIAL_LINE_STATUS = LINE.OPEN