Enable auto setup with cms_helper server command

This commit is contained in:
Iacopo Spalletti 2017-03-04 16:21:52 +01:00
parent ed37a44eee
commit 695c6a3ed9
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6

View file

@ -3,7 +3,7 @@
from __future__ import absolute_import, print_function, unicode_literals
import os
import sys
from tempfile import mkdtemp
@ -108,6 +108,7 @@ HELPER_SETTINGS = dict(
try:
import cmsplugin_filer_image.migrations_django # pragma: no cover # NOQA
HELPER_SETTINGS[
'MIGRATION_MODULES'
]['cmsplugin_filer_image'] = 'cmsplugin_filer_image.migrations_django'
@ -117,6 +118,7 @@ except ImportError:
try:
import knocker # pragma: no cover # NOQA
HELPER_SETTINGS['INSTALLED_APPS'].append('knocker')
HELPER_SETTINGS['INSTALLED_APPS'].append('channels')
HELPER_SETTINGS['INSTALLED_APPS'].append('djangocms_blog.liveblog', )
@ -130,6 +132,9 @@ except ImportError:
pass
os.environ['AUTH_USER_MODEL'] = 'tests.test_utils.CustomUser'
if 'server' in sys.argv[:3]:
HELPER_SETTINGS['BLOG_AUTO_SETUP'] = True
def run():
from djangocms_helper import runner
@ -137,7 +142,6 @@ def run():
def setup():
import sys
from djangocms_helper import runner
runner.setup('djangocms_blog', sys.modules[__name__], use_cms=True)