def cms(app, argv=sys.argv, extra_args=None):
    """
    Run commands in a django cMS environment

    :param app: application
    :param argv: arguments (default to sys.argv)
    :param extra_args: list of extra arguments
    """
    try:
        import cms  # NOQA  # nopyflakes
    except ImportError:
        print('runner.cms is available only if django CMS is installed')
        raise
    if app not in argv[:2]:
        # app is automatically added if not present
        argv.insert(1, app)
    if len(argv) < 3 and 'test' not in argv[:2]:
        # test argument is given if not argument is passed
        argv.insert(2, 'test')
    if '--cms' not in argv:
        # this is the cms runner, just add the cms argument
        argv.append('--cms')
    if extra_args:
        argv.extend(extra_args)
    return runner(argv)
def cms ( app , argv = sys . argv , extra_args = None ) : try : import cms except ImportError : print ( 'runner.cms is available only if django CMS is installed' ) raise if app not in argv [ : 2 ] : argv . insert ( 1 , app ) if len ( argv ) < 3 and 'test' not in argv [ : 2 ] : argv . insert ( 2 , 'test' ) if '--cms' not in argv : argv . append ( '--cms' ) if extra_args : argv . extend ( extra_args ) return runner ( argv )
Run commands in a django cMS environment

    :param app: application
    :param argv: arguments (default to sys.argv)
    :param extra_args: list of extra arguments