django-cms-mycmsproject-toporojo / cms / management / commands /

# -*- coding: utf-8 -*-
from __future__ import absolute_import
from import SubcommandsCommand
from import ListCommand
from import ModeratorCommand
from import UninstallCommand
from import BaseCommand
from optparse import make_option
class Command(SubcommandsCommand):
    option_list = BaseCommand.option_list + (
        make_option('--noinput', action='store_false', dest='interactive', default=True,
        help='Tells django-cms to NOT prompt the user for input of any kind. '),
    args = '<subcommand>'

    command_name = 'cms'
    subcommands = {
        'uninstall': UninstallCommand,
        'list': ListCommand,
        'moderator': ModeratorCommand,
    def help(self):
        lines = ['django CMS command line interface.', '', 'Available subcommands:']
        for subcommand in sorted(self.subcommands.keys()):
            lines.append('  %s' % subcommand)
        lines.append('Use ` cms <subcommand> --help` for help about subcommands')
        return '\n'.join(lines)