Update cms_helper.py
This commit is contained in:
parent
8657190c87
commit
07c5ed48d1
1 changed files with 23 additions and 22 deletions
|
@ -1,16 +1,16 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
|
|
||||||
gettext = lambda s: s
|
gettext = lambda s: s
|
||||||
|
|
||||||
HELPER_SETTINGS = {
|
HELPER_SETTINGS = dict(
|
||||||
'NOSE_ARGS': [
|
NOSE_ARGS=[
|
||||||
'-s',
|
'-s',
|
||||||
],
|
],
|
||||||
'ROOT_URLCONF': 'tests.test_utils.urls',
|
ROOT_URLCONF='tests.test_utils.urls',
|
||||||
'INSTALLED_APPS': [
|
INSTALLED_APPS=[
|
||||||
'admin_enhancer',
|
'admin_enhancer',
|
||||||
'filer',
|
'filer',
|
||||||
'parler',
|
'parler',
|
||||||
|
@ -22,13 +22,13 @@ HELPER_SETTINGS = {
|
||||||
'cmsplugin_filer_image',
|
'cmsplugin_filer_image',
|
||||||
'taggit_autosuggest',
|
'taggit_autosuggest',
|
||||||
],
|
],
|
||||||
'LANGUAGE_CODE': 'en',
|
LANGUAGE_CODE='en',
|
||||||
'LANGUAGES': (
|
LANGUAGES=(
|
||||||
('en', gettext('English')),
|
('en', gettext('English')),
|
||||||
('fr', gettext('French')),
|
('fr', gettext('French')),
|
||||||
('it', gettext('Italiano')),
|
('it', gettext('Italiano')),
|
||||||
),
|
),
|
||||||
'CMS_LANGUAGES': {
|
CMS_LANGUAGES={
|
||||||
1: [
|
1: [
|
||||||
{
|
{
|
||||||
'code': 'en',
|
'code': 'en',
|
||||||
|
@ -57,7 +57,7 @@ HELPER_SETTINGS = {
|
||||||
'hide_untranslated': False,
|
'hide_untranslated': False,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'PARLER_LANGUAGES': {
|
PARLER_LANGUAGES={
|
||||||
1: (
|
1: (
|
||||||
{'code': 'en'},
|
{'code': 'en'},
|
||||||
{'code': 'it'},
|
{'code': 'it'},
|
||||||
|
@ -71,31 +71,32 @@ HELPER_SETTINGS = {
|
||||||
'hide_untranslated': False,
|
'hide_untranslated': False,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'MIGRATION_MODULES': {
|
MIGRATION_MODULES={
|
||||||
'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django',
|
'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django',
|
||||||
},
|
},
|
||||||
'META_SITE_PROTOCOL': 'http',
|
META_SITE_PROTOCOL='http',
|
||||||
'META_SITE_DOMAIN': 'example.com',
|
META_SITE_DOMAIN='example.com',
|
||||||
'META_USE_OG_PROPERTIES': True,
|
META_USE_OG_PROPERTIES=True,
|
||||||
'META_USE_TWITTER_PROPERTIES': True,
|
META_USE_TWITTER_PROPERTIES=True,
|
||||||
'META_USE_GOOGLEPLUS_PROPERTIES': True,
|
META_USE_GOOGLEPLUS_PROPERTIES=True,
|
||||||
'THUMBNAIL_PROCESSORS': (
|
THUMBNAIL_PROCESSORS=(
|
||||||
'easy_thumbnails.processors.colorspace',
|
'easy_thumbnails.processors.colorspace',
|
||||||
'easy_thumbnails.processors.autocrop',
|
'easy_thumbnails.processors.autocrop',
|
||||||
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
|
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
|
||||||
'easy_thumbnails.processors.filters',
|
'easy_thumbnails.processors.filters',
|
||||||
),
|
),
|
||||||
'FILE_UPLOAD_TEMP_DIR': mkdtemp(),
|
FILE_UPLOAD_TEMP_DIR=mkdtemp(),
|
||||||
'SITE_ID': 1
|
SITE_ID=1
|
||||||
}
|
)
|
||||||
if 'test' in sys.argv:
|
if 'test' in sys.argv or len(sys.argv) == 1:
|
||||||
HELPER_SETTINGS['INSTALLED_APPS'].append('django_nose')
|
HELPER_SETTINGS['INSTALLED_APPS'].append('django_nose')
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
from djangocms_helper import runner
|
from djangocms_helper import runner
|
||||||
sys.argv.append('--nose-runner')
|
if 'test' in sys.argv or len(sys.argv) == 1:
|
||||||
|
sys.argv.append('--nose-runner')
|
||||||
runner.cms('djangocms_blog')
|
runner.cms('djangocms_blog')
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
run()
|
run()
|
||||||
|
|
Loading…
Reference in a new issue