Beispiel #1
0
 def test_should_raise_if_django_apps_not_loaded(self):
     with self.assertRaises(ImportError):
         require_app('test',
                     ['cubane.doesnotexist', 'cubane.doesnotexisteither'])
Beispiel #2
0
# coding=UTF-8
from __future__ import unicode_literals
from django.conf import settings
from cubane.lib.app import require_app
require_app(__name__, 'cubane.backend')

RESOURCES = [
    # style
    'css/cubane.media.css',

    # smartcrop
    'smartcrop/smartcrop.js',

    # javascript
    '/cubane/js/cubane.js',
    '/cubane/js/cubane.dom.js',
    '/cubane/js/cubane.urls.js',
    '/cubane/js/cubane.dialog.js',
    'js/cubane.media.js'
]

RESOURCE_TARGETS = {'backend': ['cubane.media']}


def install_backend(backend):
    if settings.CUBANE_BACKEND_MEDIA:
        from cubane.media.views import MediaBackendSection
        backend.register_section(MediaBackendSection())


def install_cms(cms):
Beispiel #3
0
 def test_should_pass_if_django_apps_loaded(self):
     require_app('test', ['cubane.cms', 'cubane.backend'])
Beispiel #4
0
 def test_should_pass_if_at_least_one_django_app_loaded(self):
     require_app('test', ['cubane.cms', 'cubane.doesnotexist'])
Beispiel #5
0
 def test_should_pass_if_django_app_loaded(self):
     require_app('test', 'cubane.cms')
Beispiel #6
0
 def test_should_ignore_in_debug(self):
     require_app('test', 'cubane.doesnotexist')
Beispiel #7
0
from cubane.lib.app import require_app
require_app(__name__, 'cubane')

INCLUDE_RESOURCES = [
    'cubane.jquery',
]

RESOURCES = ['css/select2.min.css', 'js/select2.min.js']
Beispiel #8
0
# coding=UTF-8
from __future__ import unicode_literals
from cubane.lib.app import require_app, get_app_label_ref
from cubane.lib.module import get_class_from_string
from django.conf import settings
require_app(__name__, 'django.contrib.sitemaps')
require_app(__name__, 'cubane.backend')


INCLUDE_RESOURCES = [
    'cubane.media'
]


RESOURCES = [
    'css/cubane.cms.css',
    'css/meta.preview.css',
    'css/sitemap.css',
    '/cubane/js/cubane.js',
    '/cubane/js/cubane.urls.js',
    '/cubane/js/cubane.dialog.js',
    '/cubane/js/cubane.format.js',
    'js/cubane.cms.js',
    'js/cubane.cms.sitemap.js',
]


RESOURCE_TARGETS = {
    'backend': [
        'cubane.cms'
    ]
Beispiel #9
0
# coding=UTF-8
from __future__ import unicode_literals
from cubane.lib.app import require_app
require_app(__name__, 'cubane.ishop')

RESOURCES = [
    'css/frontend.css', '/cubane/js/cubane.js', '/cubane/js/cubane.string.js',
    '/cubane/js/cubane.urls.js', '/cubane/js/cubane.dom.js', 'js/frontend.js',
    'js/varieties.js', 'js/basket.js', 'js/product.js', 'js/checkout.js',
    'js/forms.js'
]