Enable auto setup with cms_helper server command
This commit is contained in:
parent
ed37a44eee
commit
695c6a3ed9
1 changed files with 7 additions and 3 deletions
|
@ -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,9 +118,10 @@ 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',)
|
||||
HELPER_SETTINGS['INSTALLED_APPS'].append('djangocms_blog.liveblog', )
|
||||
HELPER_SETTINGS['CHANNEL_LAYERS'] = {
|
||||
'default': {
|
||||
'BACKEND': 'asgiref.inmemory.ChannelLayer',
|
||||
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue